Prove the following statement using the contrapositive method. If $ n^2 $ is divisible by 3 then n is divisible by 3. Prove the following statement using the contrapositive method. If $ n^2 $ is divisible by 3 then n is divisible by 3.
I tried using contrapositive method by assuming if not b then not a, i.e., if n is not divisible by 3 then $ n^2$ is not divisible by 3. and prove it.
Is this the correct way to do it or am I doing it wrong?
If anyone could layout an explanation could be helpful. Thanks!
With contrapositive method：
If n is not divisible by 3, let n = 3m + k, where m, k are integers and k=1,2 only.
好
Then
$n^2$  = $(3m+k)^2$=9$m^2$+6mk+$k^2$.
If k=1, $n^2$  = $(3m+k)^2$=9$m^2$+6mk+1=3(3$m^2$+2mk)+1, not divisible by 3.
If k=2, $n^2$  = $(3m+k)^2$=9$m^2$+6mk+3+1= 3(3$m^2$+2mk+1)+1,  not divisible by 3.
This is in contradictory with the assumption $n^2$ is divisible by 3. So n must be divisible by 3.
With contrapositive method：
If n is not divisible by 3, let n = 3m + k, where m, k are integers and k=1,2 only.
好
Then
$n^2$  = $(3m+k)^2$=9$m^2$+6mk+$k^2$.
If k=1, $n^2$  = $(3m+k)^2$=9$m^2$+6mk+1=3(3$m^2$+2mk)+1, not divisible by 3.
If k=2, $n^2$  = $(3m+k)^2$=9$m^2$+6mk+3+1= 3(3$m^2$+2mk+1)+1,  not divisible by 3.
This is in contradictory with the assumption $n^2$ is divisible by 3. So n must be divisible by 3.