# 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.

• You could find the continued fraction for $\sqrt{229}$ and find a theorem that says if there's no solution coming from the convergents to that fraction then there are no solutions. Dec 2, 2016 at 22:15
• Any luck with that continued fraction, Bill? Dec 4, 2016 at 12:13
• I thought about the related equation $x^2 - 229y = 12$ and ran into much the same problems you've been having when trying to prove $y$ is never a perfect square. Gotta go with the continued fraction method Gerry's been talking about. Dec 8, 2016 at 22:23
• "A detailed canonical answer is required to address all the concerns." Bill, what, exactly, are the "concerns"? What do you want to know that isn't covered in the answer I gave some months ago? Jul 14, 2017 at 13:06
• @Gerry None of the canned texts really made sense. Sorry. Don't worry, though, looks like you'll get some points regardless of what I do now. Jul 20, 2017 at 21:25

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.
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.
• Your assertion isn't quite true: if we had $p^2 - 229q^2 = 3$ for some $p$ and $q$, we would obtain a solution by taking $2p$ and $2q$ from this solution (and $p/q$ would still be equal to a convergent). However, this also doesn't happen here and is the only exceptional case that needs to be checked, since $12$ has no other square factors. Jul 20, 2017 at 21:18