Recurrence relation for $a_{n}$ where $6a_{n}$ and $10a_{n}$ are both triangular According A180926, the elements of the set
{$a:\exists m,n|60a=5n^2+5n=3m^2+3m$} satisfy the following recurrence relation:
$$a_{n}=\frac{62a_{n-1}+1+\sqrt{(48a_{n-1}+1)(80a_{n-1}+1)}}{2}$$ 
$$a_1=0$$
How this can be derived?
 A: Since we have
$$ 5(n^2 +n) = 3(m^2 +m)$$
multiplying by $4$ gives us
$$5(4n^2 + 4n + 1) - 5 = 3(4m^2 + 4m + 1) -3$$
if $x = 2n+1$ and $y = 2m+1$ we get
$$5x^2 - 3y^2 = 2$$
This is a generalized Pell's equation of the form $ax^2 - by^2 = c$ and I believe this is a solved problem.
For instance, see this: http://books.google.com/books?id=YD6UlfcRlGQC&pg=PA81
This should give us all the solutions, and so make the recurrence easy to verify.
A: Here's a complete solution, including a derivation of the recurrence relation in A180926. First, notice
$\rm\ 60\:a \:=\: 5\:(n^2+n)\ =\ 3\:(m^2+m)\ \ $  is easily transformed into the following Pell equation
$\rm\quad\quad\quad\quad\ \: 5\:x^2-3\:y^2 \:= \ 2\ \ \ $  for $\rm\ \ \ (x,\:y)\: =\: (2\:n+1,\:2\:m+1)$
Hence $\rm\ \ \ \: x^2 - 1\ =\ 4\: (n^2+n)\ =\ 48\:a,\quad\ y^2 - 1\ =\ 4\: (m^2+m)\ =\ 80\:a\quad\quad\quad\ \ (*)$
By standard Pell theory $\rm\ \: (x,y) \:\to\: (X,Y)\:=\: (4\:x+3\:y\ \ ,\ \ 5\:x+4\:y)\ $ is a solution too, since
$\rm\phantom{\quad\Rightarrow\quad}\ X+Y\omega \: =\: (4+5\:\omega)\:(x+y\:\omega) \: = \: (4\:x+3\:y + (5\:x+4\:y)\:\omega) \: ,\ \ \ \omega \:=\: \sqrt{3/5}$
$\rm\quad\Rightarrow\quad  X- Y\omega \: =\: (4-5\:\omega)\:(x-y\:\omega)\quad\quad\:$ via conjugate prior equation
$\rm\quad\Rightarrow\quad  5\: X^2 - 3\: Y^2 \: =\  5\: x^2 - 3\: y^2\: =\: 2\ \ $ via multiply the prior two equations, then scale by 5
This yields a recurrence to generate a new solution $\rm (X,Y) = (x_{n+1},\:y_{n+1})$ from a known solution $\rm\: (x,\:y) = (x_n,\:y_n)\:.\:$ We square this recurrence to obtain a recurrence for $\rm (A,\:a) = (a_{n+1},\:a_n)$
Namely $\rm\ \: (4\:x+3\:y)^2 =\ X^2$
$\rm\quad\quad\quad\quad \Rightarrow\quad\ 24\ x\:y\ =\ X^2-1 - 16\:(x^2-1) - 9\:(y^2-1) - 24$
$\rm\quad\quad\quad\quad\quad \phantom{\Rightarrow\ 24\ x\:y}\ =\ 48\:A - 16\:(48\:a) - 9\:(80\:a) - 24\quad$ by $\ (*)$
$\rm\quad\quad\quad\quad\quad \phantom{\Rightarrow\ 24\ x\:y}\ =\ 24\ (2\:A - 62\: a - 1)$
$\rm\quad\quad\quad\quad \Rightarrow\quad\ x^2\ y^2\ =\ (2\:A - 62\: a - 1)^2 $
But also $\rm\quad\quad\quad\: x^2\ y^2\ =\ (48\: a + 1)\ (80\: a + 1)\quad$ by $\ (*)$
Hence $\rm\ \ (2\ a_{n+1} - 62\ a_n - 1)^2 \ = \ (48\ a_n+1)\ (80\ a_n+1)\ \ $  as was to be proved.
