# composition series length and prime divisors of a number

Let $G$ and $H$ be two abelian finite groups such that $\ell(G) = \ell(H)$ (Where $\ell$ denotes the length of their composition series). Suppose that $|H|$ and $|G|$ have the same prime divisors and conclude $|G| = |H|$.

My approach: Since both groups are abelian, all of their subgroups are abelian, then their composition factors are simple abelian groups, that is $\mathbb{Z}/p\mathbb{Z}$. Also, it's easy to show that $|G|$ will be the product of the composition factors of its composition series, i.e

If i have a composition series for $G$ as: $$\{1_G\} = G_0 \trianglelefteq G_1 \trianglelefteq ... \trianglelefteq G_k=G$$ Then: $$|G| = \prod_{i\geq 0}^{k-1}\big|G_{i+1}/G_i\big|$$ How to use the divisors fact to conclude? thanks.

• What does "have the same prime divisors" mean? If it includes multiplicity of each prime divisor, $\lvert G\rvert = \lvert H\rvert$ is trivial, and the length of the composition series isn't needed at all. If it only refers to the set of primes dividing each, then $G = \mathbb{Z}/(2^2\cdot 3)$ and $H = \mathbb{Z}/(2\cdot 3^2)$ are simple - well, not simple, easy - counterexamples. – Daniel Fischer Oct 18 '16 at 15:28
• It only refers to the set of primes dividing each. – user263732 Oct 18 '16 at 15:29
• In any case, Daniel Fischer's comment answers your question. – verret Oct 18 '16 at 17:58