If we let a, b, c, d, and x be integers is it possible that $$x^2+a^2 = (x+1)^2 + b^2 = (x+2)^2 + c^2 = (x+3)^2 + d^2$$

My initial thought is no way! I tried expanding and simplifying, getting $$a^2 = 2x+1 + b^2 = 4x+4 + c^2 = 6x+9 + d^2$$.

It seems that the difference between these perfect squares is impossible - but why? Consecutive perfect squares always differ by some $2n+1$ term, and each term must continue to increase by an odd amount...

Any ideas in the right direction are greatly appreciated!

  • $\begingroup$ Perhaps reducing this mod 4 or something similar may be one way to approach the problem. $\endgroup$
    – JB King
    Oct 29, 2013 at 20:42
  • $\begingroup$ You can get three in a row, $$ 1105 = 31^2 + 12^2 = 32^2 + 9^2 = 33^2 + 4^2. $$ My first impression is that four ought to be possible. Try $n = 5 \cdot 13 \cdot 17 \cdot 29 = 32045,$ then try $n = 5 \cdot 13 \cdot 17 \cdot 29 \cdot 37 = 1185665.$ And so on, multiply by the next prime $4k+1.$ Meanwhile, where did you get this problem?? $\endgroup$
    – Will Jagy
    Oct 29, 2013 at 20:48
  • $\begingroup$ @WillJagy I have tried that approach in pari/gp, and no combination seems to work, unfortunately :( $\endgroup$
    – Old John
    Oct 29, 2013 at 20:51
  • 1
    $\begingroup$ @OldJohn, sometimes pari gets these problems that they call kidney stones, it cannot output what you want it to. $\endgroup$
    – Will Jagy
    Oct 29, 2013 at 20:53
  • $\begingroup$ The problem comes from an old sheet of basic number theory practice problems - all intended to be able to solve by hand. I thought perhaps I was missing something obvious... $\endgroup$
    – Georgia
    Oct 29, 2013 at 21:00

1 Answer 1


I get it. Mod 4 suffices. Well, mod 8 anyway. One of $x,x+1,x+2,x+3$ is divisible by 4. If its matching partner out of $a,b,c,d$ is even, the common sum is divisible by 4, and we actually cannot have any odd numbers involved, which cannot occur with consecutive $x,x+1,x+2,x+3.$ Required detail: the sum of two odd squares is $2 \pmod 4.$

So, the partner is odd, the sum is $1 \pmod 8.$ One of the other $x+j$ numbers is $2 \pmod 4,$ so that sum must be $5 \pmod 8.$ So, actually, impossible.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.