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$.
I have no idea how to proceed. Please help.
Thanks.
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$.