TITLE: If p is prime and p|$a^n$ prove that $p^n|a^n$
QUESTION [5 upvotes]: If p is prime and p|$a^n$ prove that $p^n|a^n$.
I understand the idea but am having some trouble writing the formal proof.
Is this correct?
Suppose $p$ is prime and $p$|$a^n$. Then $p|a$ $\implies $$a=pk$ , $k$ $\in \mathbb{Z}.$
But then $a^n $= $(pk)^n$=$p^nk^n$ and so $p^n$|$p^nk^n$. Hence $p^n$|$a^n$

REPLY [13 votes]: Hint: If $p$ is prime and $p|ab$ then $p|a$ or $p|b$.