Abelian finite groups and their subgroups I have asked a similar question about 40 days ago, it did not generate any answers perhaps because it was not well formulated. So I have deleted it. Here is another attempt.
Consider pairs $(G,H)$ where $G$ is a finite abelian $p$-group of exponent $p^n$, $H<G$. The direct product is defined as $(G,H)\times (G',H')=(G\times G', H\times H')$. How many directly indecomposable pairs are there depending on $p, n$?
Certainly if $G$ is cyclic $p$-group then any pair $(G,H)$ is indecomposable. But I have found an indecomposable pair for $n=6$ and any $p$ where $G$ is not cyclic.
 A: This has been, in some sense, answered in this recent MO question: https://mathoverflow.net/q/366008
The short answer is that if you consider exponent $p^n$ for $n\geq 7$, there are wildly many indecomposable pairs. There are infinitely many for $n=6$, according to Jeremy Rickard in that answer.
I wondered why I was having so much trouble even with the case $H$ cyclic! I do have a partial result in that case if it's of interest, but it gets very messy as the number of summands of $G$ increases. Everything is nice for two summands, becomes complicated for three summands, and then I can only write down heuristics after that. For three summands you need $n\geq 6$, which chimes with Jeremy's statement.
Edit: I will write down what I found for the cyclic case, although it's not so obvious now it's of any value.
Notice that being decomposable in the sense of the question is, for cyclic $H$, the same as being contained in an overgroup that has a complement. Call such an element a co-element (complemented overgroup), and otherwise an nco-element. If $x$ is a generator for $H$, it means that $x$ can be written as $(x_1,\dots,x_n)$, where $x_i$ are coefficients in a basis for $G$, and there exists a basis such that some $x_i$ is $0$.
So we can take the projection of $x$ onto some summand of $G$ and work with that. This immediately shows the following:
If $G_1$ has no nco-elements, and $G_1$ is a summand of $G$, then $G$ has no nco-elements.
From now on we will hunt for nco-elements.
We next see that $G=C_{p^n}\times C_{p^n}$ has no nco-elements. This follows easily: every element of $G$ has a root of order $p^n$, and elements of maximal order in abelian groups are complemented. (This is the start of a standard proof of the cyclic decomposition theorem for abelian groups.)
Thus $G=C_{p^{a_1}}\times \cdots \times C_{p^{a_r}}$, and all $a_r$ are distinct. Arrange so that $a_i>a_{i+1}$.
If $G=C_{p^a}\times C_{p^b}$ ($a>b$) and $x$ has no root of order greater than $p^b$ then $x$ is a co-element. Certainly we can take a root of $x$ of order $p^b$, so assume that $o(x)=p^b$. Note that $x=(x_1^{p^{a-b}\alpha},x_2^\beta)$. Such an element generates a complement to a subgroup of order $p^a$ unless $\beta$ is a multiple of $p$. But then $x$ has a $p$th root, a contradiction.
So $x$ can be chosen to have order greater than $p^b$, and cannot have order $p^a$ (as maximal-order elements are co-elements). Thus $a\geq b+2$.
Now there are lots of such elements. We just need to choose an element of order greater than $p^b$ that does not have a root of order $p^a$. For example, $(x_1,px_2)$ will do.
This solves the case of two summands for $G$. In general, we can choose any pair inside a decomposition of $G$ into summands and such an element must be an nco-element, otherwise we can complement it in that summand, and yield a complement in the whole group.
(This next bit is corrected, as noted by Jeremy in the comments.)
So the smallest possible case allowed by this is $C_{p^5}\times C_{p^3}\times C_{p}$, generated by $a,b,c$, and where $x$ should be something like $p^2a+pb+c$. That works for each of $\langle a,c\rangle$, $\langle b,c\rangle$ and $\langle a,b\rangle$. This gives all such elements for exponent $p^5$.
This yields:
Suppose that $G$ has an nco-element, and that $G$ is $d$-generator for $d\geq 3$. Then $G$ has exponent at least $p^5$. If $G$ has exponent $p^5$ then $d=3$ and the examples are exactly as above.
To generalize this you need a step of at least two in between the orders of the summands, and an increasing power of $p$ in the representation of the element $x$.
A: The linked MO question has 2 answers. The second answer refers to
Sapir, M. V. Varieties with a finite number of subquasivarieties. Sibirsk. Mat. Zh. 22 (1981), no. 6, 168–187. Note that this paper was published 35 years earlier than the paper in the first answer there.
Indeed, Sapir's paper has Section 1 about subgroups of finite abelian groups. Here is the construction from that paper.
Let $p$ be a prime. For every $n\ge 2$ consider abelian group $A_n$ and its subgroup $B_n$:
$$A_n=\langle a_1,...,a_n, b_1,...,b_n, c_1,...,c_n\mid |a_i|=p^6,|b_i|=p^4, |c_i|=p^2\rangle,$$
$$B_n=\langle p^2a_i+pb_i+c_i, p^2b_{j+1}+pc_j, p^2b_1+pc_n\mid 1\le i\le n, 1\le j\le n-1\rangle .$$
Lemma 1.1 states that if $GCD(m,n)=1$ and there is a homomorphism $\phi: A_m\to A_n$ such that $\phi(B_m)\subseteq B_n$ then $\phi(p^5(a_1-a_2))=0$.
This lemma immediately gives the answer to my question.
In addition, Proposition 2.1 B on page 178 implies that if the exponent is $p^n$, $n<6$, the number of directly indecomposable pairs is finite.
The paper also considers finite abelian groups with 2 subgroups $C<B$. There is a natural notion of direct indecmposability there and a similar result with 3 replacing 6 (see Prop. 2.1).
There are even older results about pairs (abelian group of exponent $p^n$, its subgroup). For example
Baur, Walter, Undecidability of the theory of abelian groups with a subgroup.
Proc. Amer. Math. Soc. 55 (1976), no. 1, 125–128
shows that if $n\ge 9$ then the elementary theory of these pairs is undecidable. I am not sure that result is true for finite groups though (it might but the groups constructed there are infinite).
