# Find all perfect squares in two series

Two number sequences defined as: $$a_1=b_1=1,$$ $$a_k=3a_{k-1}+4b_{k-1},\quad b_k=2a_{k-1}+3b_{k-1}\quad \forall 2\le k\in\mathbb{Z}^+$$

Is it possible to find all $k$s that make $a_k$ perfect squares?

update

It is possible to find that:

$$a_n=\dfrac{1}{2} \left(1+\sqrt{2}\right) \left(\left(3+2 \sqrt{2}\right)^{n-1}-\left(3-2 \sqrt{2}\right)^n\right),\quad n\in\mathbb{Z}^+$$

• Have you found any examples (other than $k=1$)? – lulu Jun 20 '17 at 20:15
• Hint : first note that $a_k^2-2b_k^2=-1$... – Mike Bennett Jun 20 '17 at 20:20
• @Mike Bennett What is the rest? – Michael Rozenberg Jun 20 '17 at 20:40
• $a_{n+2}=6a_{n+1}-a_n$, which gives $a_n$, which is very ugly. – Michael Rozenberg Jun 20 '17 at 20:52
• @MichaelRozenberg it is also true that $b_{n+2} = 6 b_{n+1} - b_n.$ This is Cayley-Hamilton for the given 2 by 2 coefficient matrix. – Will Jagy Jun 20 '17 at 21:14

Just to fill in the early parts, the given coefficient matrix is an "automorphism" of the quadratic form $x^2 - 2 y^2.$ That is, $$(3x+4y)^2 - 2 (2x+3y)^2 = x^2 - 2 y^2.$$ So, starting with $a_1^2 - 2 b_1^2,$ we will always get the same value for $a_j^2 - 2 b_j^2.$

Next, the trace is $6$ and determinant $1,$ if we call the matrix $$A = \left( \begin{array}{cc} 3 & 4 \\ 2 & 3 \end{array} \right)$$ we get, by Cayley-Hamilton. $$A^2 - 6 A + I = 0$$ We also get $$a_{n+2} = 6 a_{n+1} - a_n,$$ $$b_{n+2} = 6 b_{n+1} - b_n.$$

The end, which i may not be able to supply, is usually unique factorization, in this case in the ring of integers of $\mathbb Q [\sqrt 2].$ i will see if it is in Mordell's book.

==========================================

jagy@phobeusjunior:~$./Pell_Target_Fundamental Automorphism matrix: 3 4 2 3 Automorphism backwards: 3 -4 -2 3 3^2 - 2 2^2 = 1 u^2 - 2 v^2 = -1 Tue Jun 20 15:15:12 PDT 2017 u: 1 v: 1 ratio: 1 SEED KEEP +- u: 7 v: 5 ratio: 1.4 u: 41 v: 29 ratio: 1.41379 u: 239 v: 169 ratio: 1.4142 u: 1393 v: 985 ratio: 1.41421 u: 8119 v: 5741 ratio: 1.41421 u: 47321 v: 33461 ratio: 1.41421 u: 275807 v: 195025 ratio: 1.41421 u: 1607521 v: 1136689 ratio: 1.41421 u: 9369319 v: 6625109 ratio: 1.41421 u: 54608393 v: 38613965 ratio: 1.41421 Tue Jun 20 15:17:12 PDT 2017 u^2 - 2 v^2 = -1 jagy@phobeusjunior:~$


=======================

• I can find that $a_n=\frac{1}{2} \left(1+\sqrt{2}\right) \left(\left(3+2 \sqrt{2}\right)^{n-1}-\left(3-2 \sqrt{2}\right)^n\right)$,but don't know how to do the next step. – LCFactorization Jun 20 '17 at 21:55
• @LCFactorization it would appear that Mordell's book says that there is just one solution when BOTH $a,b$ are squares. Even then, he does not write it all out. – Will Jagy Jun 20 '17 at 22:13
• May I have the book name ? – LCFactorization Jun 21 '17 at 0:44
• @lc Diophantine Equations (1969). – Will Jagy Jun 21 '17 at 0:50
• So finding the square values of the $b_k$ amounts to an old problem, solved by Ljunggren in the 1940s. There is no known "easy" solution, but the only square values are $1$ and $169$. The squares in the $a_k$ sequence (or, equivalently, the equation $x^4-2y^2=-1$) are much easier to find -- see Mordell, page 18. $a_k=1$ is the only one. – Mike Bennett Jun 21 '17 at 12:25