Prove that if $p$ is a prime, $a$ is an integer, and $p$ divides $a^2$, then $p$ divides $a$. I think I need to use the Fundamental Theorem of Arithmetic but that only applies to $a &gt; 1$ so I think I need to do it by cases.

Case 1) $a = 0$.

Case 2) $a = 1$.

Case 3) $a &gt; 1$.

Case 4) $a &lt; 0$.

Cases 1 and 2 are easy.  I think Case 4 will follow from Case 3 but I struggle with Case 3.

Case 3) $a &gt; 1$. Then by Fundamental Theorem of Arithmetic, $a$ is equal to a unique product of primes. Then, $a^2$ is a product of those primes squared. Then, because $p$ divides $a^2$, $a^2 = pk$ for some $k$ (an integer). So that product of primes squared equals $pk$. Now how do I argue that one of those primes must be $p$?  Once we see that one of those primes is $p$ (i.e. $p$ is a prime factor of $a$), we can say that $p$ divides $a$.

So my questions are:
How do I argue that one of those primes must be $p$?
Can the proof be done without resorting to four cases?
Assume that $p \nmid a$. Then, $a=p \cdot q +r$ for some $r &gt;0$,  s.t. $r \neq 0 (modp) $.

Since,  ${p \mid a^2 } \Rightarrow {a^2 \equiv 0 (mod p)}$

So, $a^2=(p \cdot q +r)^2=p^2 q^2+2pqr+r^2 \equiv r^2 (modp)\neq 0 (modp)  \Rightarrow p \nmid a^2$ Contradiction.
Let the prime factorisation of a be as follows :
 $a = p_1p_2 \dots p_n$, where $p_1,p_2, \dots p_n$ are primes, not necessarily distinct. 
Therefore, $a_2 = (p_1p_2 \dots p_n)(p_1p_2 . . . p_n) = p_{1^2}p_{2^2} \dots p_{n^2}$.

Now, we are given that $p$ divides $a{^2}$. Therefore, from the Fundamental Theorem of Arithmetic, it follows that $p$ is one of the prime factors of $a{^2}$. However, using the uniqueness part of the Fundamental Theorem of Arithmetic, we realise that the only prime factors of $a{^2}$ are $p_1p_2 \dots p_n$. So $p$ is one of $p_1, p_2,\dots, p_n$.

Now, since $a = p_1p_2 \dots p_n$, $p$ divides $a$.