Easiest way to show $x^2 - 229y^2 = 12$ has no solutions in integers

Asking Wolfram Alpha doesn't count, but for what it's worth, I have already done so.

I have tried squares modulo a few different values. For example, modulo $36$, we have the possibility that $x^2 \equiv 13$ (e.g., if $x = 7$) and $229y^2 \equiv 1$ (e.g., if $y = 7$ also). This $13 - 1$ problem shows up in most of the other moduli I have tried.

Is modular arithmetic the way to go, just that I haven't tried the right modulus yet, or is a different method the way to go?


This goes to showing that $3$ is irreducible but not prime in $\mathcal{O}_{\textbf{Q}(\sqrt{229})}$. Since the fundamental unit is of norm $-1$, I don't need to worry about $x^2 - 229y^2 = -12$, and since the fundamental unit is a so-called "half-integer," I don't need to worry about $x^2 - 229y^2 = \pm 3$ either.


Solution 1:

The continued fraction for $\sqrt{229}$ is $[15,\dot7,1,1,7,\dot{30}]$. The convergents to $\sqrt{229}$ derived from the continued fraction are $p/q=15/1,106/7,121/8,227/15,1710/113,\dots$ The values of $p^2-229q^2$ are $-4,15,-15,4,-1,\dots$ – these repeat (with changed sign), since the continued fraction is periodic.

Now there's a theorem that says that if $p^2-Dq^2=c$ with $|c|<\sqrt D$ then $p/q$ is a convergent to the continued fraction of $\sqrt D$. We have $D=229$, $c=12$ so the condition holds, but no convergent gives us $p^2-229q^2=12$, so the equation has no solution.

The theorem is stated at http://mathworld.wolfram.com/PellEquation.html but also in any textbook treatment of continued fractions and Pell's equation, where you'll also find details behind the other assertions I have made here.

EDIT. Note that Dario Alpern has a solver for $ax^2+bxy+cy^2+dx+ey+f=0$. In Step-by-step mode, it tells you exactly what it does on any given problem. For this problem, it uses exactly the method I've used (although it's even sparser on detail than I have been). I had some trouble getting the solver to work, though – no luck on Safari, nor on Firefox, but it worked fine on Chrome.

Dario has some other tools on his site that are worth knowing about.