# solution of diophantine equation $y^3 = z^2 - 1$

Prove that the unique solution in positive integers to the Diophantine equation $$y^3 = z^2 - 1$$ is $$y = 2, z = 3.$$

Intuitively, perfect squares and perfect cubes get "too far" from each other. I tried considering various approaches like considering numbers modulo 4, modulo 8, etc. For instance, if $$y$$ is even, z is odd, and writing $$z = 2k+1, y = 2g$$, we get that $$\frac{k(k+1)}2 = g^3\Rightarrow 2g^3 = k(k+1)$$. Basically, no triangular numbers other than the trivial one are cubes. I saw a proof of this fact that uses Catalan's conjecture, but I don't think that should be necessary. Since $$k$$ and $$k+1$$ are coprime, this implies that they are of the form $$2u$$ and $$v$$ for some coprime cubes $$u$$ and $$v$$. The only way $$|2u - v| = 1$$ is if $$u = 1, v = 1$$. Indeed if $$u=1,$$ the result is obvious and if $$u > 1, v\neq u$$. First consider when $$u < v.$$ If $$u=2, 2u^3 = 16$$, which differs from $$v^3$$ by at least 9. For large enough v, clearly $$2(v-1)^3$$ exceeds $$v^3$$.

So I'm stuck here, and I was wondering if there's a proof of this that avoids using Catalan's conjecture, which is actually extremely difficult to prove?

In the other case, $$y$$ is odd, and z is even, so we can write $$y = 2g + 1, z = 2k$$, and then $$y^3$$ must be the product of two coprime consecutive odd integers. Thus these coprime odd integers must themselves be perfect cubes. But as these cubes are distinct positive integers, they must differ by at least $$8-1 = 7$$ and thus they cannot be consecutive.

Transform the cube into a binomial and expand its terms. Consider $$1$$ to be some remainder $$r$$ in the algorithm to calculate the integer cube root of $$z^2$$.

$$y^3=z^2-r \iff a^3+3a^2b+3ab^2+b^3=z^2-r \implies y=a+b \\ \frac{z^2-a^3-r}{3a^2+3ab+b^2}=b \implies3a^2+3ab+b^2 \ne 0$$

Isolate part of the expression in the denominator so that it's easier to work with. Find two numbers $$a$$ and $$b$$ so that the expression is different than zero, but try to make it as close to zero as possible without it being equal, because it will strengthen the proof with lower values.

$$3a^2+3ab+b^2 \ne0 \iff a^2+2ab+b^2 \ne ab+ \frac{2}{3}b^2 \iff \left(a+b \right)^2-ab \ne \frac{2}{3}b^2$$

It's possible for $$a$$ and $$b$$ to substitute into a difference of squares when both of them are squares. The right hand side is divisible by $$3$$ so $$b$$ can be a multiple. $$0$$ and $$2$$ are solutions as well. They have interesting outcomes for different problems. The opening question can be solved by replacing those in the expression at the top.

$$y=-1+3 \land r=1 \implies \frac{z^2+1-1}{3-9+9}=3 \iff z^2=9 \\ y=1+1 \land r=1 \implies \frac{z^2-1-1}{3+3+1}=1 \iff z^2=9 \\ y=0+2 \land r=1 \implies \frac{z^2-0-1}{0+0+4}=2 \iff z^2=9$$

Bonus solutions for the problems $$y^2>x^3$$ and $$y^2=x^3$$ are given by $$a=1$$, $$b=9$$ for the former and $$a=1$$, $$b=3$$ for the latter using the same method. The replacement is homework. I hope that I helped.