Please also tell me how to figure out what to do and how to do such question? Thank you :)
Asked
Active
Viewed 325 times
-3
-
Duplicate of this and this. – dxiv Oct 04 '16 at 18:01
2 Answers
5
Start with the fact that any $n\in\mathbb{Z}$ is odd or even. Thus may be expressed as $2k$ or $2k+1$ where $k\in\mathbb{Z}$. Now, what happens when you square those expressions?

ClownInTheMoon
- 1,987
1
Use congruences modulo $4$:
Any integer is congruent to $0, 1,2$ or $3\mod4$, so any square is congruent to $0^2=0$, $1^2=1$, $2^2\equiv 0$ or $3^2\equiv 1\mod4$. To sum it up, any square is congruent to $0$ or $1\mod4$.

Bernard
- 175,478
-
This is a bit like swatting a fly with a sledgehammer. You don't need congruence classes for this, and given that the OP asks such a question I doubt he is familiar with the concept. – TMM Oct 04 '16 at 12:29
-
Well, in my opinion, anyone from beginning of high school should be aware of congruences, because it's such a simplification. Just like college students should know about equivalence of functions, instead of invoking over and over ‘L'Hospital, L'Hospital, …’ – Bernard Oct 04 '16 at 12:55
-
Sure, students should know a lot more, but students should also easily be able to prove that any square is congruent to $0$ or $1$ modulo $4$. The fact that the OP does not know suggests he does not fall in the category of students you are referring to. – TMM Oct 04 '16 at 13:01
-
Well TMM you figured it right, I'm indeed unfamiliar with this concept. Well, I want to study the basics of this in much more detail, can anyone help me out. I mean where and what to start? – user375072 Oct 04 '16 at 17:47
-
You can look at Modular arithmetic Wikipedia notice. It is only a way to remove irrelevant details from arithmetic calculations. – Bernard Oct 04 '16 at 18:03