There is a way to define the notion of prime number in the framework of group theory, thanks to the following observation:  

*Observation*: A non-trivial group $G$ is cyclic of prime order iff for any subgroup $K \le G$ then $K=1$ or $G$.


Now the notion of group and subgroup can be [internalized](https://ncatlab.org/nlab/show/internalization) to any category (see [group object](https://ncatlab.org/nlab/show/group+object) and [subobject](https://ncatlab.org/nlab/show/subobject)). Then, using the above observation, we can internalize the notion of prime number to any category, and call it *prime number object*.


More precisely, let $C$ be a category with binary products and a terminal object $\*$. Let $\operatorname{Grp}(C)$ be the category of group objects in $C$. An object $G$ in $\operatorname{Grp}(C)$ is
called a *prime number object* in $C$ if for any monomorphism in $\operatorname{Grp}(C)$, $i: H \hookrightarrow G$, then $H=\*$ or $i$ is an isomorphism.


**Question**: Is a prime number object always given by the data of a prime number (or a set of prime numbers)?


*Remark 1*: My guess is yes, but if we relax the notion of *group object* with the notion of *Hopf object* (as suggested in [Adrien's answer](https://mathoverflow.net/a/393744/34538) to [Is a Hopf algebra a group object of some category?](https://mathoverflow.net/questions/393743/is-a-hopf-algebra-a-group-object-of-some-category)) then I expect the question to become open and hard (see [Is there a non-trivial Hopf algebra without left coideal subalgebra?](https://mathoverflow.net/q/192033/34538)).


*Remark 2*: We can also define the notion of *natural number object* (eventually relaxed as above) using the fact that a group is finite iff its [subgroup lattice](https://en.wikipedia.org/wiki/Lattice_of_subgroups) is finite, and [Ore's theorem](https://mathscinet.ams.org/mathscinet-getitem?mr=1546048) stating that a finite group is cyclic iff its subgroup lattice is distributive.



Are the prime number objects given by the prime numbers?
The question is very vague as it never says what it means by "given by the data of a prime number". Though I think the following example should convince anyone that classyfing such "prime number object" can be much more complicated than listing prime numbers.


Take $K$ to be a fixed group and $\mathcal{C}$ to be the category of $K$-sets (i.e. sets with an action of $K$).


A group object of $\mathcal{C}$ is a group with an action of $K$, and any irreducible representation of $K$ on a $\mathbb{Z}/p\mathbb{Z}$-vector space give you such a "prime number object".


In particular such objects contain much more information than just a prime numbers: their numbers of elements is in general a prime power (or infinite) and a group $K$ can have many different irreducible representations in characteristic $p$, even of the same cardinality.


Note that there might be other kind of "prime number object" in that category that are not even "attached" to a prime number in any reasonable sense: if $K = \mathbb{Q}^\*$ is the multiplicative group of rational, then $\mathbb{Q}$ with its natural action of $\mathbb{Q}^\*$ and its additive group structure is a "prime number object" in $K$-sets. And it is not related to any prime number.


