# If $n$ is such a positive integer, that $8|n^2$, then $4|n$

I'm new to the subject of discrete mathematics.

This statement is either true or false and it has to be proved. I've struggled with this exercise for quite a while, and this is what I came up with:

• If $8|n^2$ then $n^2$ is even
• If $n^2$ is even then $n$ is even
• If $n$ is positive and $4|n$ then $n = 4k$ ($k$ - any positive integer)
• If $n = 4k$ then $n^2 = 16k^2$
• $8|16k^2$ and $4|4k$, therefore the statement is true

$n|m$ means $n$ divides $m$

Can someone verify whether I proved it or not?

• Use the fact that if a prime $p$ divides a product of numbers, then it will divide one factor. – Wuestenfux Sep 18 '18 at 13:08
• Your proof is wrong. You use the fact that $4|n$ in your proof. Hint is to see that $2|(n/2)^2$, so that $2|(n/2)$. I'm not sure who downvoted, but I upvoted it, I respect anyone who tries to prove something for themself – Jakobian Sep 18 '18 at 13:12
• What you have proven is the converse, if 4 | n then 8 | n^2 – Dark Malthorp Sep 18 '18 at 13:13

If $k$ is the number of factors $2$ that $n$ has in its prime factorisation, then we know that $n^2$ has $2k$ such factors.

We are given that $8$ divides $n^2$ so $2k \ge 3$. As $k$ is an integer this means that $k \ge 2$, so indeed $4|n$.

No, you did not prove it. At no point what you wrote as something equivalent to “… and therefore $4\mid n^2$”.

You stated (correctly) that $n$ is even. How could $n$ then fail to be a multiple of $4$? Only if $n=2k$, whre $k$ is an odd number. But then $n^2=4k^2$ and, since $k^2$ is odd too, $8\nmid4k^2$. Thereby, a contradiction is reached and so $4\mid n$.

Sorry, but your proof is wrong, because at a certain point you assume that $4\mid n$.

Since $8\mid n^2$, $n$ is even, so $n=2a$. Hence $8\mid 4a^2$, which implies $2\mid a^2$. Therefore $a$ is even: $a=2b$ and finally $n=4b$.

Hint: the number of primes in the prime factorization of a square is even. Now $8=2^3$.

No, you have not prooved it.

What you've prooved is the reverse implication (if $4|n$, then $8|n^2$) and two first steps of your reasoning seems to be not used at all.

There are two hints, that may help you start the proper proof (two alternative proofs - try to do them both). I think you can manage how to continue the proof from these points.

Hint

You can start your proof by noticing, that $n=m2^k$ for some integer $k$ and odd $m$.

Hint

Alternatively you can start your proof by noticing, that if $a=b\cdot c$ and $8|a$, then $4|b$ or $4|c$.