# Every four consecutive integers contains one which cannot be written as sum of two squares

Every four consecutive integers contains one which cannot be written as sum of two squares.

Could anyone advise me how to prove the statement? Do I use Jacobi's two squares theorem? Hints will suffice, thank you.

• Out of four consecutive integers, one is congruent to $0$ modulo 4, one is congruent to $1$ modulo 4, one is congruent to $2$ modulo 4, and one is congruent to $3$ modulo 4. – Lord Shark the Unknown Oct 30 '18 at 18:26
• Hint: What are the squares mod 4? What are the possible values for sums of two squares mod 4? – JavaMan Oct 30 '18 at 18:27

Hint:

• There is a number of the form of $$4k+3$$.

• You might like to explore $$x^2 \pmod{4}$$.

You may consider the following as a hint:

Squares are of the form $$4k$$ or $$4k+1$$ "easy to verify $$(2k)^2$$,$$(2k+1)^2$$". Now, what are the possible forms of the summation of these numbers?

• It seems that numbers of the form $4k+3$, which occurs in every four consecutive integers, cannot be written as sum of two squares. – Alexy Vincenzo Oct 31 '18 at 1:03
• which proves the statement. is not it? – Maged Saeed Oct 31 '18 at 3:04

One further hint: Consider that Pythagorean triples $$x^2+y^2=z^2$$ can be found as $$x=m^2-n^2,\space y=2mn,\space z=m^2+n^2$$.