Prove that for any integer $n$, $(n^2)$ or $(n^2 - 1)$ is divisible by $4$

97 Views Asked by At

Prove that for any integer $n$, $(n^2)$ or $(n^2 - 1)$ is divisible by $4$

Do you have any suggestions for solving this problem?

I can see it works in the following examples:
n = 3 (9 is not divisible by 4, but 8 is divisible by 4)
n = 5 (25 is not divisible by 4, but 24 is divisisble by 4)

My idea was to multiply the two conditions $(n^2)$ and $(n^2-1)$ together and then prove that the result was somehow divisible by 4, but I don't know how to prove this.

Thank you very much for any help or guidance you can offer on this.

5

There are 5 best solutions below

2
On BEST ANSWER

If $n $ is even, then $n^2$ is divisible by $4$. Else, $n $ is odd. Remark then that $n^2-1 = (n-1)(n+1) $, and $n-1$, $n+1$ are both even.

0
On

Hint: Look at the cases where $n$ is either even or odd separately. You could also consider the quadratic residues modulo $4$, if you’re familiar with this part of number theory.

0
On

HINT: There are only 4 possible residues of $n$ modulo $4$, and these are $0,1,2,3$. Check each of these cases.

0
On

Note that $n^2 \equiv 1 \pmod 4$ for every odd integer $n$. Indeed, writing $n=2k+1$, $k$ an integer, then $n^2= (2k+1)^2 = 4k^2+4k+1$ for every odd integer $n$. So then what about $n^2-1$?

Note that $n^2 = 4k^2$ which is divisible by 4 for every even integer $n=2k$.

0
On

If $2\mid n$, then $4\mid n^2$. If $2\not\mid n$, then $2\mid n+1,n-1$, so $4\mid n^2-1=(n+1)(n-1)$.