# Prove that the diophantine equation $x^2 + (x+1)^2 = y^2$ has infinitely many solutions in positive integers.

Prove that the diophantine equation $x^2 + (x+1)^2 = y^2$ has infinitely many solutions in positive integers.

Now, that's a Pythagorean Triplet. So, we have to prove that there are infinitely many solutions to it. I have found a few: $(x, x+1, y) = (0, 1, 1), (3, 4, 5), (20, 21, 29), (119, 120, 169), (696, 697, 985)$. I wrote a script to calculate solutions till ten million and there are only $9$ of them. Also, they alternate between even and odd $x$ though the $y$ is always odd. Somehow the $x$ turns out to be a little less than the previous $x$ times $6$.

Thanks.

• Is it known there are infinitely many? Or is it a conjecture? May 28, 2016 at 15:58
• @N.S.JOHN It's a problem on the problem set and, hence, I believe is true. May 28, 2016 at 15:59
• The solution to this problem in a General way. There. artofproblemsolving.com/community/c3046h1049346__2 May 28, 2016 at 16:41
• @individ Many, many thanks. May 28, 2016 at 16:48

Let $z=2x+1$. The original equation is equivalent to: $$z^2-2y^2 = -1$$ that is a standard Pell's equation with solutions given by the units of $\mathbb{Z}[\sqrt{2}]$ - have a look at Pell numbers. For instance, the norm of $1+\sqrt{2}$ in $\mathbb{Z}[\sqrt{2}]$ is $(1+\sqrt{2})(1-\sqrt{2})=-1$, so the same applies to any odd power of $(1+\sqrt{2})$. That gives that the sequence: $$z_0=1,\quad z_1=7,\quad z_{n+2}=6z_{n+1}-z_{n}$$ provides an infinite number of solutions, coupled with: $$y_0=1,\quad y_1=5,\quad y_{n+2}=6y_{n+1}-y_n,$$ since the minimal polynomial of $(1+\sqrt{2})^2$ is exactly $x^2-6x+1$.

I don't know if it is correct or not but thanks to Jack D'Aurizio I think I have a solution.

First of all, we have that $2n^2 - 1 = k^2$ has infinitely many solutions (I am still not able to prove this. Can anyone help me with this?).

Now, choose $x = \frac{k-1}{2}$, $x + 1 = \frac{k+1}{2}$ and $y = n$ (since $k$ is odd). This is a solution to the Diophantine Equation.

You can also use following identity:

$$[2(3x+2y+1)+1]^2-2(4x+3y+2)^2=(2x+1)^2-2y^2$$

We can easily see that this equation is similar to $$(2x+1)^2-2y^2=-1$$ which is a pell equation and $$x=3$$ and $$y=5$$ satisfy it. That is x and y also satisfy the identity and we can have larger solutions as $$x_1=3x+2y+1$$ and $$y_1=4x+3y+2$$. For example for $$x=3$$ and $$y=5$$ we have $$x_1=20$$ and $$y_1=29.$$

$${{\left( {{\left( b\pm\sqrt{2{{b}^{2}}-1}\right) }^{2}}-{{b}^{2}}\right) }^{2}}+4{{b}^{2}}\,{{\left( b\pm\sqrt{2{{b}^{2}}-1}\right) }^{2}}={{\left( {{\left( b\pm\sqrt{2{{b}^{2}}-1}\right) }^{2}}+{{b}^{2}}\right) }^{2}}$$ $${{b}_{n}}=\sum_{k=0}^{n}{\left. {{2}^{k+\operatorname{floor}\left( \frac{k}{2}\right) }}\,{{3}^{n-k}}\,\begin{pmatrix}n\\ k\end{pmatrix}\right.}$$

or $${{\left( {{\left( b\pm\sqrt{2{{b}^{2}}+1}\right) }^{2}}-{{b}^{2}}\right) }^{2}}+4{{b}^{2}}\,{{\left( b\pm\sqrt{2{{b}^{2}}+1}\right) }^{2}}={{\left( {{\left( b\pm\sqrt{2{{b}^{2}}+1}\right) }^{2}}+{{b}^{2}}\right) }^{2}}$$ $${{b}_{n}}=\sum_{k=0}^{n}{\left. \left( \operatorname{ceiling}\left( \frac{k}{2}\right) -\operatorname{floor}\left( \frac{k}{2}\right) \right) \,{{2}^{k+\operatorname{floor}\left( \frac{k}{2}\right) }}\,{{3}^{n-k}}\,\begin{pmatrix}n\\ k\end{pmatrix}\right.}$$