solutions of 1+x+x2+x3=y2

This article shows that the only solutions in integers to the equation


are the obvious trivial solutions x=0,±1 together with x=7,y=20. This result was known to Fermat.

First, note that the equation is (1+x)(1+x2)=y2, so we have immediately that x-1. So, noting the solutions for x=0,±1, assume in what follows that x>1.

Let d=gcd(1+x,1+x2). Then x-1(modd), so that 1+x22(modd). But d1+x2 so that 20(modd) and d is either 1 or 2. If d=1, so that 1+x and 1+x2 are coprimeMathworldPlanetmath, then 1+x and 1+x2 must both be squares. But 1+x2 is not a square for x>1. Thus the gcd of 1+x and 1+x2 is 2, so each must be twice a square, say


and then


so that r2,r2-1,s form a primitive Pythagorean tripleMathworldPlanetmath (note that r>1 since x>1).

Recall that if (a,b,c) is a primitive Pythagorean triple, then precisely one of a and b is even, and we can choose coprime integers p,q such that a=p2-q2,b=2pq,c=p2+q2 or a=2pq,b=p2-q2,c=p2+q2 depending on the parity of a.

Suppose first that r is odd. Then


Then 1=r2-(r2-1)=(p-q)2-2q2. Now, note that p-q must be a square, say p-q=t2, since gcd(p-q,p+q)=1 and (p-q)(p+q) is a square. Then


so that


But we know that the sum of two fourth powers can be a square ( only for the trivial case where all are zero. So r cannot be odd.

So suppose that r is even. Then


From the second of these formulas, we see that p must be even (consider both sides (mod4)), say p=2t2. Now,


Since p and q have opposite parity, p+q±1 are even, so that


Thus one of u,u+1 is a fourth power and the other is twice a fourth power, say b4 and 2c4.



so that b4-2c4=±1.

If b4-2c4=1, then


and again we have a square being the sum of two fourth powers. So this case is impossible.

If b4-2c4=-1, write e=c2, then (e2-1)2=e4-b4. It follows (see here ( that either b=0 or e2-1=0. If b=0, we get the impossibility e4-2e2+1=e4, while if (e2-1)2=0, then e4=b4,e=±1 and so b=±1. Then p+q-12=b4=1, so that p+q=3. Thus r2=4, so r=2 and, finally, 1+x=2r2=8, so that x=7.

Thus, the only nontrivial solution to the equation given is

Title solutions of 1+x+x2+x3=y2
Canonical name SolutionsOf1xx2x3y2
Date of creation 2013-03-22 17:05:09
Last modified on 2013-03-22 17:05:09
Owner rm50 (10146)
Last modified by rm50 (10146)
Numerical id 10
Author rm50 (10146)
Entry type Theorem
Classification msc 11F80
Classification msc 14H52
Classification msc 11D41