Any number which on division by 4 leaves a remainder 2 or 3 is not a perfect square.
We should divide the integers into even numbers and odd numbers.
Case 1 (even numbers):
"n=2*x"
Then:
"n^2 \u2261 4*x^2 \u2261 0 mod 4"
(because if you will divide it by 4 it will be 0)
Case 2 (odd numbers):
"n = 2*x + 1"
Then:
"n^2 \u2261 4*x^2 + 4*x + 1 \u2261 4*( x2 + x ) + 1 \u2261 1 mod 4"
(because if you will divide it without "+1" by 4 it will be 0, with "+1" remainder will be 1)
Thus, any even number squared equals 0 mod 4 and every odd number squared equals 1 mod 4. Any number which on division by 4 leaves a remainder 2 or 3 is not a perfect square.
Comments
Leave a comment