Square of integers of form

98 Views Asked by At

Prove that the square of any integer is of the form $5k, 5k+1 \text { or } 5k-1$.

Please help which theory should I use? I can't use principle of induction or division algorithm or Euclidean algorithm

2

There are 2 best solutions below

1
On BEST ANSWER

Hint: Every integer is of the form $5a$, $5a\pm1$, or $5a\pm2$. Now square these forms.

2
On

Let $n$ be an arbitrary positive integer and write it in the form $n=5j+c$ where $0\leq c<5$. Then, $$ n^{2}\equiv\left(5j+c\right)^{2}\equiv25j^{2}+10jc+c^{2}\equiv c^{2}\mod5. $$ Now, it's a matter of checking $c^{2}$ for each value of $c$ between 0 (inclusive) and 5 (exclusive).