$p$ prime, $p\mid a^k \Rightarrow p^k\mid a^k$

Suppose $p$ is a prime and $a$ and $k$ are positive integers. Prove that, if $p \mid a^k$, then $p^k\mid a^k$ also.

I have already proven that if $a,b,n\in\mathbb{N}$ and if $a^n\mid b^n$, then $a\mid b$. I tried using induction:

$k=1 \Rightarrow p\mid a^1 \Rightarrow p^1\mid a^1$. Assume the statement holds for some $k$. Then if $p\mid a^{k+1}\Rightarrow p\mid a^ka$. Since $p$ is prime, $p\mid a$ or $p\mid a^k$. If $p\mid a$, we are done. If $p\mid a^k$ then by assumption, $p^k\mid a^k$ and so by the lemma, $p\mid a$ and so $p^{k+1}\mid a^{k+1}$.

Does this work?


By the Euclid's lemma: if $p|ab$ then $p|a$ or $p|b$. Using this lemma we have $$p|a\cdot a^{k-1}\implies (p|a)\lor (p|a^{k-1})$$ and if $p|a$ then we are done and if $p|a^{k-1}$ then by descending induction we prove that $p|a$. Finally $p|a\implies p^k|a^k$.


Hint: Try to prove that: $p\:|\:a^k$ implies $p\:|\:a$.


As $ a^{k} = a\cdot ....\cdot a $ and $ a = p_{1}^{e_{1}}\cdot p_{2}^{e_{2}}\cdot .... \cdot p_{n}^{e_{n}} $ for some $ p_{1},....,p_{n} $ all prime and $ e_{1},....,e_{n} \in \mathbb{N} $, it follows that $ a^{k} = p_{1}^{ke_{1}}\cdot .... \cdot p_{n}^{ke_{n}} $. Thus if $ p|a^{k} $ for $ p $ a prime then $ p \in \{p_{1},....,p_{n}\} $. So suppose $ p = p_{1} $ (otherwise relabel), then $ \frac{a^{k}}{p^{k}} = p_{1}^{ke_{1}-k} \cdot .... \cdot p_{n}^{ke_{n}} $ and so $ p^{k} | a^{k} $ as required.


I would use induction and the property for prime elements to show $p \mid a$, so we get $p^{k}\mid a^{k}$.