OFFSET
1,2
COMMENTS
When are both t+1 and 7*t+1 perfect squares? This problem gives the equation 7*x^2-6 = y^2.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..250
Index entries for linear recurrences with constant coefficients, signature (0,16,0,-1).
FORMULA
a(n+4) = 16*a(n+2)-a(n) with a(1)=1, a(2)=13, a(3)=29, a(4)=209.
From Bruno Berselli, Nov 03 2011: (Start)
G.f.: x*(1+x)*(1+12*x+x^2)/(1-16*x^2+x^4).
a(n) = ((-(-1)^n+t)*(8+3*t)^floor(n/2)-((-1)^n+t)*(8-3*t)^floor(n/2))/2 with t=sqrt(7).
a(n)^2 = 7*A161852(n)^2-6. (End)
MATHEMATICA
LinearRecurrence[{0, 16, 0, -1}, {1, 13, 29, 209}, 25] (* Bruno Berselli, Nov 11 2011 *)
PROG
(Maxima) makelist(expand(((-(-1)^n+sqrt(7))*(8+3*sqrt(7))^floor(n/2)-((-1)^n+sqrt(7))*(8-3*sqrt(7))^floor(n/2))/2), n, 1, 25); /* Bruno Berselli, Nov 03 2011 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sture Sjöstedt, Oct 26 2011
EXTENSIONS
More terms from Bruno Berselli, Nov 02 2011
STATUS
approved