# Solving $(2^k-3)b^2 - (2^{k+1}+1)ab - (2^k+2)a^2 = 0$

I’m trying to solve the Diophantine equation \begin{align} \tag{$\star$} (2^k-3)b^2 - (2^{k+1}+1)ab - (2^k+2)a^2 = 0, \end{align} where $k$ is a positive integer, and $a$ and $b$ are relatively prime integers (not necessarily positive). A computer search turns up only the solutions $k=1$ and $k=4$, with no more solutions $1 \le k \le 100$.

I had hoped that I could use Vieta-jumping to solve it, but after much trying and many sheets of sketch paper, I haven’t found the magic incantation. Any help — either with a Vieta-jumping hint, or with any hints toward a proof mechanism — would be greatly appreciated.

In case it helps, I know that $$(b^2-2ab-a^2) \mid 2 \cdot 23.$$ Also, it is trivial to show that ($\star$) implies $2^{2k+3}=c^2+23$ for some integer $c$.

• It has an integer solution if and only if the discriminant is a square – Will Jagy Aug 23 '16 at 0:43
• Yes (cf. my edit of 11 minutes ago). The question then is, can ($\star$) be attacked in any other way? – Kieren MacMillan Aug 23 '16 at 0:47

jagy@phobeusjunior:~$./Pell_Target_Fundamental Automorphism matrix: 3 8 1 3 Automorphism backwards: 3 -8 -1 3 3^2 - 8 1^2 = 1 x^2 - 8 y^2 = -23 Mon Aug 22 18:00:32 PDT 2016 x: 3 y: 2 ratio: 1.5 SEED KEEP +- y = 2 x: 7 y: 3 ratio: 2.33333 SEED BACK ONE STEP -3 , 2 y = 3 x: 25 y: 9 ratio: 2.77778 y = 3^2 x: 45 y: 16 ratio: 2.8125 y = 2^4 x: 147 y: 52 ratio: 2.82692 y = 2^2 13 x: 263 y: 93 ratio: 2.82796 y = 3 31 x: 857 y: 303 ratio: 2.82838 y = 3 101 x: 1533 y: 542 ratio: 2.82841 y = 2 271 x: 4995 y: 1766 ratio: 2.82843 y = 2 883 x: 8935 y: 3159 ratio: 2.82843 y = 3^5 13 x: 29113 y: 10293 ratio: 2.82843 y = 3 47 73 x: 52077 y: 18412 ratio: 2.82843 y = 2^2 4603 x: 169683 y: 59992 ratio: 2.82843 y = 2^3 7499 x: 303527 y: 107313 ratio: 2.82843 y = 3 35771 x: 988985 y: 349659 ratio: 2.82843 y = 3^2 38851 x: 1769085 y: 625466 ratio: 2.82843 y = 2 277 1129 x: 5764227 y: 2037962 ratio: 2.82843 y = 2 1018981 x: 10310983 y: 3645483 ratio: 2.82843 y = 3 1215161 x: 33596377 y: 11878113 ratio: 2.82843 y = 3 13 151 2017 x: 60096813 y: 21247432 ratio: 2.82843 y = 2^3 2655929 Mon Aug 22 18:02:32 PDT 2016 x^2 - 8 y^2 = -23 jagy@phobeusjunior:~$

• Based on your observation, I found Apery's theorem that equations of the form $$x^2+D=2^n$$ have at most two solutions. I'll look at that to see what I can see. Still going to try to solve ($\star$) directly/independently, though… because, based on my derivation, an effective attack could be applied to a lot more equations than just the Ramanujan-Nagell type. – Kieren MacMillan Aug 23 '16 at 1:33
• @KierenMacMillan $x^2 + 7 = 2^n$ has about five solutions, so Apery's theorem cannot be quite what you wrote. – Will Jagy Aug 23 '16 at 1:37
• Yes, $D=7$ is the single exception (q.v. en.wikipedia.org/wiki/…). – Kieren MacMillan Aug 23 '16 at 1:40
• @KierenMacMillan this math.tifr.res.in/~saradha/saradharev.pdf says $x^2 + 23 = 2^n$ has the ones we know along with $45^2 + 23 = 2048 = 2^{11}$ I see, that is my $y=16.$ – Will Jagy Aug 23 '16 at 1:44