# Show that $x^2 − Dy^2 = 1$ has infinitely many integer solutions.

Let $D$ be a non-square positive integer. Suppose there are positive integers $a$ and $b$ such that $a^2 − Db^2 = 1$. Show that the Diophantine equation $x^2 − Dy^2 = 1$ has infinitely many integer solutions.

I expressed $a^2 − Db^2$ as $a^2 − Db^2 = (a + b\sqrt D)(a − b\sqrt D)$
I'm not sure how to proceed from here. Any help is appreciated.

• Outline: For any positive integer $n$ we have $(a+b\sqrt{D})^n(a-b\sqrt{D})^n=1$. Let $(a+b\sqrt{D})^n=a_n +b_n\sqrt{D}$. Then $a_n^2-Db_n^2=1$. – André Nicolas Mar 24 '15 at 1:51
• Note that the tough part, which you are not being asked to show, is that there are positive integers $a,b$ such that $a^2-Db^2=1$. – André Nicolas Mar 24 '15 at 1:54
• – punctured dusk Mar 24 '15 at 8:42

## 1 Answer

If $1 = (a+b\sqrt{D})(a-b\sqrt{D})$, what happens if we square both sides?

• Then $1 = (a+b\sqrt{D})^2(a-b\sqrt{D})^2 = (a^2 - Db^2)^2$ But I don't see how this helps us – mike russel Mar 24 '15 at 2:01
• @mikerussel Expand the two squares separately. – Slade Mar 24 '15 at 2:02
• Alright, $1 = (a^2+2ab\sqrt{D}+b^2D)(a^2-2ab\sqrt{D}+b^2D)$ What are we trying to achieve by this? – mike russel Mar 24 '15 at 2:05
• @mikerussel Rewrite as $(s+t\sqrt{D})(s-t\sqrt{D}) = s^2 - Dt^2$. Note that this is precisely what André suggested as a comment, with $n=2$. – Slade Mar 24 '15 at 2:06
• We get $1 = ((a^2+b^2D)+(2ab)\sqrt{D})((a^2+b^2D)-(2ab)\sqrt{D})=(a^2+b^2D)^2 - (2ab)^2D$ – mike russel Mar 24 '15 at 2:10