Proof verification: If $gcd(n,9)=3$ then $gcd(n^2,9)=9$, $p∣n \implies p∣n^2$, $p∣n^2\implies p∣n$.

188 Views Asked by At

1. gcd$(n,9)=3$ then gcd$(n^2,9)=9$

2. Let $p$ be a prime and $n \in \mathbb{N}$, if $p∣n$ then $p∣n^2$.

3. Let $p$ be a prime and $n \in \mathbb{N}$, if $p∣n^2$ then $p∣n$.

I'm not sure about all of these proofs, here's what I've got at the moment.

1. By Bézout's identity (Given $a,b \in \mathbb{Z}$ not both 0, there exist $x,y \in \mathbb{Z}$ such that $ax+by=$gcd($a,b$)) there exist $x,y \in \mathbb{Z}$ such that $nx+9y=3$=gcd($n,9$)
$nx+9y=3\implies (nx+9y)^2=3^2\implies n^2x^2+18nxy+81y^2=9\implies n^2(x^2)+9(2nxy+9y^2)=9$
and therefore gcd($n^2,9)=9$.

2. $p∣n \implies n=pk (k \in \mathbb{Z})\implies n^2=p^2k^2 \implies n^2=p(pk^2) \implies p∣n^2$.
Isn't this one just true even when p isn't a prime? I'm not seeing the relevance of p being a prime here unless I've done something wrong or it's just to compare to 3.

3. $p∣n^2 \implies p∣n\cdot n \implies p∣n$ or $p∣n$ (by a prime divisibility property: Given a prime $p$, if $p∣ab$ then $p∣a$ or $p∣b$) $\implies p∣n$.
This one just feels too simple, have I missed out steps or have I done the whole thing incorrectly?

Thanks in advance for any help!