Abelian Group Factored by Prime

Theorem
Let $G$ be a finite abelian group.

Let $p$ be a prime.

Factor the order of $G$ as:
 * $\left|{G}\right| = m p^n$

such that $p$ does not divide $m$.

Then:
 * $G = H \times K$

where $H = \left\{{x \in G : x^{p^n} = e}\right\}$, and
 * $K = \left\{{x \in G : x^m = e}\right\}$

Furthermore:
 * $\left|{H}\right| = p^n$

Proof
From Subgroup of Elements whose Order Divides Integer, both $H$ and $K$ are subgroups of $G$.

Also, because $G$ is abelian, $H$ and $K$ are normal by Subgroup of Abelian Group is Normal.

In order to prove $G = H \times K$, by the Internal Direct Product Theorem it suffices to show that $G = H K$ and $H \cap K = \left\{{e}\right\}$.

Since we have $\gcd \left\{{m, p^n}\right\} = 1$, there are integers $s$ and $t$ such that $1 = s m + t p^n$ by Bézout's Lemma.

Let $s$ and $t$ be two such integers.

So:
 * $\forall x \in G: x = x^{s m + t p^n} = x^{sm}x^{tp^n}$

From Element to Power of Group Order is Identity:
 * $x^{\left|{G}\right|} = e$

Therefore:
 * $(x^{s m})^{p^n} = (x^{p^n m})^s = e^s = e$ and $(x^{t p^n})^m = (x^{p^n m})^t = e^t = e$

By definition, $x^{s m} \in H$ and $x^{t p^n}\in K$.

We conclude that $G = H K$.

Now suppose that some $x \in H \cap K$.

Then $x^{p^n} = e = x^m$, so from Element to Power of Multiple of Order is Identity $\left|{x}\right|$ divides both $p^n$ and $m$.

Since $p$ does not divide $m$, it follows that $\left|{x}\right| = 1$.

Therefore, by Identity is Only Group Element of Order 1:
 * $x = e$

Thus:
 * $H \cap K = \left\{e\right\}$

It follows that $G = H \times K$.

Suppose that $p \mathop \backslash \left|{K}\right|$.

From Cauchy's Group Theorem, this implies that there is some element (call it $k$) of $K$ with order $p$.

But we also have $k^m = e$ from the definition of $K$, so by Element to Power of Multiple of Order is Identity we must have $p \mathop \backslash m$, a contradiction.

We conclude that:
 * $p$ does not divide $\left|{K}\right|$

It follows that:
 * $p^n \mathop \backslash \left|{H}\right|$

Now suppose a prime $q$ (with $q \ne p$) divides $\left\vert{H}\right\vert$.

Again from Cauchy's Group Theorem, this implies that there is some element $h$ of $H$ with order $q$.

But since $h^{p^n} = e$ from the definition of $H$, Element to Power of Multiple of Order is Identity gives us $q \mathop \backslash p^n$, a contradiction.

It follows that $q$ does not divide $\left|{H}\right|$.

We conclude $\left|{H}\right| = p^n$, as desired.