The equation $$ b^2 = \frac{a(a+1)}{2} + 1 $$ where $a$ and $b$ are integers, has the following smallish-integer solutions:
b a
23 -33
11 -16
4 -6
2 -3
1 -1
1 0
2 2
4 5 <--- the motivating one!
11 15
23 32
64 90
These solutions (if I call them $a_i, b_i$, where $a_0 = 0$) appeared to me to satisfy a pair of recurrences, namely
\begin{align} a_{k+4} &= 8 b_{k+2} + a_{k} \\ b_{k+4} &= 4 a_{k+2} + b_{k} + 2 \end{align}
I've since proved that these recurrences, initialized with either the 0th and 2nd row or the 1st and 3rd row, generate sequences of numbers that do satisfy the given equation. (The proof involves decoupling, and then solving the resulting constant-coefficient 4th-order recurrences, one homogeneous and one inhomogeneous, solving for initial conditions, and verifying that the main equation holds for the resulting sequences.)
What I now wish to prove is that these are the only possible solutions, and I don't see a simple way to do that. Any ideas or hints?
Note: This problem arose from observing that the 15 balls on a pool table form a triangle whose side consists of 5 balls, but that when the cue-ball is added, you can form a square with four balls on a side. I made this observation about 47 years ago, discovered the recurrences by staring at the table of pairs for a long time, together with some blind luck and tinkered with it over the years. Now that I've done the part I always wanted to do (the recurrences do generate new solutions), I'm interested in getting help with proving that they're the only ones.
Here we take $W=2A+1.$
The structure of the $\mathbb Z$ automorphism group of an indefinite binary quadratic form is discussed in many places in many ways. In brief, the proper automorphism group is infinite cyclic along with $\pm 1,$ so one commonly switches attention to $PSL_2 \mathbb Z.$ Then, as always applies for Pell forms $x^2 - D y^2,$ we throw in a single improper automorph, $(x,y)\mapsto (x,-y).$ My favorite book that discusses the group is Binary Quadratic Forms by Duncan A. Buell. Another one, some differences in notation, also called Binary Quadratic Forms, by Buchmann and Vollmer.
J. H. Conway introduced the topograph method for indefinite binary quadratic forms in The Sensual Quadratic Form. There is a brief presentation in Elements of Number Theory by John Stillwell. I have taken a sort of overlap of the two presentations, in which I play down the middle coefficients of the forms but emphasize the specific solutions to $x^2 - D y^2 = n,$ along with incorporating the automorphism group of the form in the diagram. So, below are all solutions to what I called $W^2 - 8 B^2 = -7.$
Meanwhile, acting on column vectors, the generator of the automorphism group of the form is $$ M = \left( \begin{array}{rr} 3 & 8 \\ 1 & 3 \end{array} \right). $$
We call $M$ an automorphism (proper) of the quadratic form because $\det M = 1$ and $$ \color{red}{ M^T G M = G}, $$ where $$ G = \left( \begin{array}{rr} 1 & 0 \\ 0 & -8 \end{array} \right). $$
Note that $M$ is a 2 by 2 matrix, determinant $1$ and trace $6.$ By Cayley-Hamilton, we have $$ M^2 - 6 M + I = 0, $$ or $$ M^2 = 6M - I. $$ As a result, put all solutions $(W_n, B_n)$ in sequence, and we get $$ W_{n+2} = 6 W_{n+1} - W_n, $$ $$ B_{n+2} = 6 B_{n+1} - B_n. $$ As you can see in the diagram, one may see how the values for $-7$ actually split into two interleaved sequences according to these recurrences: $$ W_n = 5,31,181,... $$ and $$ W_n = 1,11,65,... $$ We also get two threads for the $B's,$ $$ B_n = 2,11,64,... $$ and $$ B_n = 1,4,23,... $$ Sometimes the two threads can be combined, usually not. As you can see in the diagram below, the two threads are caused by an improper automorph, this time let us call it $(x,y)\mapsto (-x,y).$
Alrighty, I thought it might help to fill in as much of the complete diagram as would fit on my original. Properly speaking, every edge of the infinite graph, actually a tree, should have either a $0$ or a positive integer and a little arrow. I put many of those in, using orange, which is a little too close to the red I used for each occurrence of $(-7).$ Can't win them all. Also, as we move away from the "river," that being the central line, we simply add coordinates. For example $(1,0)+(3,1)= (4,1).$ On the negative side,$(-2,1)+(-1,1)= (-3,2).$ Worth emphasizing that there are two types of phenomena that give finiteness for the number of "orbits" that give $-7,$ the second of which is the "climbing lemma," that the absolute values of the numbers only increase when we move away from the river. So, in the first layer of negative values, we get $-4,-7,-8,-7,-4,$ and so on. In the second layer, possibly hard to read, we get only $-23,-31,-31,-23,$ over and over. So that is it, any further layers on the negative side have absolute values strictly larger than $7.$