Prove that there are no positive integer solutions to $$x^2+1=y^3$$ This problem is easy if you apply Catalans conjecture and still doable talking about Gaussian integers and UFD's. However, can this problem be solved using pre-university mathematics?

I am talking about elementary number theoretical solutions. Do they exist?

  • 1
    $\begingroup$ @Alizter If ab is a square and a and b are coprime, then both are squares. $\endgroup$ Commented Oct 2, 2014 at 21:21
  • $\begingroup$ Related: math.stackexchange.com/questions/5914/… $\endgroup$ Commented Oct 2, 2014 at 23:20
  • $\begingroup$ I think the answer is "YES" — see my answer/proof, below. $\endgroup$ Commented Nov 9, 2014 at 20:25
  • 2
    $\begingroup$ I just found a second, far more elegant, elementary solution. I think I'm going to write this one up and submit it for publication. Thanks for the inspiration! $\endgroup$ Commented Feb 24, 2016 at 20:49
  • 1
    $\begingroup$ @PluckyBird: I’m putting together the final version of my paper now. It includes elementary solutions — most new — for the equations $X^3=Y^2+k$ with $-4 \le k \le 4$. In several cases (including this one), I’m including multiple elementary proofs. $\endgroup$ Commented Jun 29, 2020 at 21:35

2 Answers 2


Lemma. If $a$ and $b$ are integers such that $3a^4+3a^2+1=b^2\!$, then $a=0$ and $b=\pm 1$.

Proof. We may, without loss of generality, assume that $a$ and $b$ are non-negative. Assume, contrary to the lemma, that $a \ne 0$ and $b > 1$ are integers satisfying the equation. Evidently $b$ is odd, say $b=2c+1$ for an integer $c \ge 1$. Hence \begin{align*} 3a^4 + 3a^2+1 &= (2c+1)^2 \\ 3a^2(a^2+1) &= 4c(c+1). \end{align*} Since $4 \nmid 3(a^2+1)$, regardless of the parity of $a$, we must have $2 \mid a^2$; hence $a$ is even, say $a=2d$ for an integer $d \ge 1$. Now \begin{align*} 3d^2(4d^2+1) &= c(c+1). \end{align*} We now show that this equation has no solutions with $c,d \ge 1$. Assume to the contrary that there exist integers $p,q,r,s \ge 1$ such that \begin{align*} 3d^2 &= pq, &&& c &= pr, \\ 4d^2+1 &= rs, &&& c+1 &= qs. \end{align*} Since $\gcd(p,q) \mid \gcd(pr,qs) = \gcd(c,c+1)=1$ implies $\gcd(p,q)=1$, we may write $d=uv$ with $\gcd(u,v)=1$ and consider the two possible cases.

Case 1: $p=u^2$ and $q=3v^2$. Hence $c=pr = u^2r$, and by substitution $c+1=u^2r+1 = 3v^2s$. On the other hand, $rs-1 = 4d^2=4u^2v^2$, and adding these two relations yields \begin{align*} (rs-1)+(u^2r+1) &= 4u^2v^2 + 3v^2s \\ r(s+u^2) &= v^2(4u^2+3s). \end{align*} Since $d=uv$, the equation $rs = 4d^2+1$ forces $\gcd(v,r)=\gcd(s,u)=1$. Hence $v^2 \mid (u^2+s)$, and $\gcd(s+u^2,4u^2+3s) = \gcd(s+u^2,3(s+u^2)+u^2)=\gcd(s+u^2,u^2) = \gcd(s,u^2)=1$. Thus we conclude $r=4u^2+3s$ and $v^2=s+u^2$. Substituting now gives \begin{equation*} r = 4u^2+3s = 4u^2+3(v^2-u^2) = u^2+3v^2. \end{equation*} Multiplying, $4u^2v^2+1=rs=(u^2+3v^2)(v^2-u^2)$, which implies $u^4+1=3v^2(v^2-2u^2)$. But $3 \nmid u$ (because $3 \mid q$ and $\gcd(p,q)=1)$, so $u^4+1 \equiv 2\!\pmod{3}$, a contradiction.

Case 2: $p=3u^2$ and $q=v^2$. Now $c+1=pr+1=qs$ gives $3u^2r+1=v^2s$. We have $rs-1=4d^2=4u^2v^2$, and adding the two relations yields \begin{align*} (rs-1) + (3u^2r+1) &= 4u^2v^2 + v^2s \\ r(s+3u^2) &= v^2(4u^2+s). \end{align*} As before, considering common factors leads to the conclusion $s+3u^2=v^2$ and \begin{equation*} r=4u^2+s =4u^2+(v^2-3u^2) = u^2+v^2. \end{equation*} Multiplying, $4u^2v^2+1 = rs = (u^2+v^2)(v^2-3u^2)$, which is $3u^2(u^2+2v^2)=(v^2-1)(v^2+1)$. Since $3$ can never divide $v^2+1$, we deduce $v^2-1=3u_1^2w_1$ and $v^2+1=u_2^2w_2$ where $u=u_1u_2$ and $u^2+2v^2=w_1w_2$. As $4 \nmid (v^2+1)$, we deduce that $u_2$ is odd, $w_2 \equiv 1\text{ or }2\!\pmod{4}$, and $\gcd(u_2,w_1)=1$. Adding yields $2v^2 = (v^2-1)+(v^2+1) = 3u_1^2w_1 + u_2^2w_2$, and by substitution \begin{align*} w_1w_2 &= u^2+2v^2 \\ &= u_1^2u_2^2+ (3u_1^2w_1 + u_2^2w_2) \\ w_2(w_1-u_2^2) &= u_1^2(u_2^2+ 3w_1). \end{align*} Since $\gcd(w_1-u_2^2,u_2^2+3w_1)$ divides the sum $4w_1$, and $\gcd(w_1,u_2)=1$ and $u_2$ is odd, we deduce $w_1-u_2^2=u_1^2$. Now $w_2 = u_2^2+3w_1 = u_2^2+3(u_2^2+u_1^2) = (2u_2)^2+3u_1^2 \equiv 0\text{ or }3\!\pmod{4}$, contradicting $w_2 \equiv 1\text{ or }2\!\pmod{4}$ and proving the lemma.

Theorem. The equation $X^2 +1 = Y^3$ has only one integer solution, namely $(x,y)=(0,1)$.

Proof. Assume $x$ and $y$ are integers such that $x^2+1 = y^3$. Considering the equation modulo $3$, we quickly deduce that $$x^2 = (3z+1)^3−1 = 9z(3z^2+3z+1)$$ for some integer $z$. Since $\gcd(z,3z^2+3z+1)=1$, both $z$ and $3z^2+3z+1$ must be squares. Write $z=a^2$ for an integer $a$, and hence for some integer $b$ we have $b^2 = 3z^2+3z+1 = 3a^4+3a^2+1$. Now the lemma forces $a=0$, so that $z=a^2=0$, and $y=3z+1=1$, as claimed.

  • 1
    $\begingroup$ +1 Nicely done. The main thing to prove the lemma was choosing factors $p$, $q$, $r$ and $s$. My approach to the equation $3a^4+3a^2+1=b^2$ was showing contradiction through infinite descent and Pell-Fermat equation but I was stuck for several days and couldn't get it. I'm glad that this question has finally been solved using elementary methods :) $\endgroup$
    – MathGod
    Commented Nov 18, 2014 at 11:12
  • 1
    $\begingroup$ @MathGod: I think a proof by descent would be more enlightening than mine, and would probably lead to a more general method applicable to more equations than this ad hoc method. We should keep looking for that! $\endgroup$ Commented Nov 18, 2014 at 11:57
  • $\begingroup$ There is a small gap, which will be easy to fill (and the fix might actually give us a hint towards a proof by descent) — I'll post an updated/corrected answer soon. $\endgroup$ Commented Nov 21, 2014 at 15:18
  • 1
    $\begingroup$ @awllower: $3u^2=v^2-s$, not $r^2-s$, right? $\endgroup$ Commented Dec 23, 2019 at 4:21
  • 1
    $\begingroup$ @MathGod: For a Pell+descent proof, see <jstor.org/stable/24496717>. $\endgroup$ Commented Jun 28, 2020 at 0:41

An alternative proof and a generalisation

As stated in the accepted answer, it is sufficient to prove that $3a^4+3a^2+1=b^2$ has no positive integer solution. With a change of notation we shall prove the following generalisation by using the same method used for Does the equation $y^2=3x^4-3x^2+1$ have an elementary solution?


No equation of either of the forms $$ Ax^4-6x^2y^2+Cy^4=z^2,AC=-3\tag{1}$$ $$ ax^4+3x^2y^2+cy^4=z^2,ac=3\tag{2}$$ has a positive integer solution.


First note that, for either equation, we can suppose that $x,y,z$ are pairwise coprime since a common factor of any pair of $x,y,z$ would be a factor of all and cancellation can occur.

Also note that precisely one of $A$ and $C$ is divisible by $3$. Without loss of generality we can suppose that $3$ is a factor of $C$ and that $A\in \{\pm 1\}.$ Then $z^2\equiv A\pmod 3$ and so $A=1$. Similarly, we can suppose $a=1$.

An equation of form (1)

$x^4-6x^2y^2-3y^4=z^2$ can be rewritten, using completing the square, as $$\left (\frac{x^2-3y^2-z}{2}\right )\left (\frac{x^2-3y^2+z}{2}\right)=3y^4.$$ Since the two bracketed factors, $L$ and $M$ say, differ by the integer $z$ and have integer product, they are both integers. Furthermore, if $q$ is a prime common factor of $L$ and $M$, then $q$ would be a factor of both $z$ and $y$, a contradiction.

Therefore $\{L,M\}=\{au^4,cv^4\}$, where $ac=3$ and $y=uv$, with $u$ and $v$ coprime. Then $$au^4+cv^4=x^2-3y^2=x^2-3u^2v^2.$$ Therefore $au^4+3u^2v^2+cv^4=x^2$, $ac=3$, an equation of form (2).

It is important to note that the mapping $(x,y,z)\rightarrow (u,v,w)$ is invertible. Only one solution set can map to $(u,v,w)$ by this process.

An equation of form (2)

Let $u,v,x$ be a pairwise coprime solution of $ u^4+3u^2v^2+3v^4=x^2$ and let $t$ be the greatest common divisor of $v$ and $2$. Then $(U,V,W)=(\frac{2u}{t},\frac{v}{t},\frac{4x}{t^2})$ is a pairwise coprime solution of $U^4+12U^2V^2+48V^4=W^2$.

This can be rewritten, using completing the square, as $$\left (\frac{U^2+6V^2-W}{2}\right )\left (\frac{U^2+6V^2+W}{2}\right)=-3V^4.$$ The bracketed factors, $L$ and $M$, are again coprime integers.Therefore $\{L,M\}=\{aX^4,cY^4\}$, where $ac=-3$ and $V=XY$, with $X$ and $Y$ coprime. Then $$aX^4-6X^2Y^2+cY^4=U^2,ac=-3,$$ an equation of form (1). Again, this mapping of solutions is invertible.


We have seen that any positive integer solution $(x,y,z)$ of an equation of form (1) leads to another positive integer solution $(X,Y,Z)$, where $$Y=\frac{y}{tuX}.$$ Any monotonically strictly decreasing series of positive integers must terminate and so the above process must lead to solutions with $tuX=1$.

It is now straightforward to plug $u=X=1$ and thus $U=2$ back into the equations to obtain the contradiction $$1-6Y^2-3Y^4=4.$$


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .