# Group as direct sum of cyclic groups

What are necessary conditions for a cyclic group $$G$$ to be a direct sum of cyclic groups?

I saw somewhere that $$G$$ must be a non $$p$$-group. But I couldn't prove it.

I think the only necessary condition is that the group $$G$$ is abelian. This condition is not sufficient. Every finitely-generated abelian group has a description as a direct sum of cyclic groups, but the direct product of infinitely many cyclic groups is not a direct sum.
Some $$p$$-groups are the direct sum of cyclic groups, for example $$\mathbb Z/p\mathbb Z \oplus \mathbb Z/p\mathbb Z$$.
After your edit: we can see that if a cyclic group is to be a direct sum of (at least two nontrivial) cyclic groups, our group must be finite (since $$\mathbb Z$$ is not), of order, say $$N$$, and that $$N$$ must be a composite number with no multiplicity in its prime factorization. The Chinese Remainder Theorem allows us to find decompositions in this case. What's more, this is a necessary condition: as an example, $$\mathbb Z/p^2\mathbb Z$$ would need to be isomorphic to $$\mathbb Z/p \mathbb Z \oplus \mathbb Z /p \mathbb Z$$, but the former has an element of order $$p^2$$ while the latter does not. This is the general obstruction to a finite cyclic group being the direct sum of at least two non-trivial cyclic groups.