OFFSET
1,2
COMMENTS
When are both n+1 and 11*n+1 perfect squares? This problem gives the equation 11*x^2-10 = y^2.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..250
Index entries for linear recurrences with constant coefficients, signature (0, 20, 0, -1).
FORMULA
a(n+4) = 20*a(n+2)-a(n) with a(1)=1, a(2)=23, a(3)=43, a(4)=461.
G.f.: x*(1+x)*(1+22*x+x^2)/(1-20*x^2+x^4). - Bruno Berselli, Nov 04 2011
a(n) = ((-(-1)^n-t)*(10-3*t)^floor(n/2)+(-(-1)^n+t)*(10+3*t)^floor(n/2))/2 where t=sqrt(11). - Bruno Berselli, Nov 14 2011
MATHEMATICA
LinearRecurrence[{0, 20, 0, -1}, {1, 23, 43, 461}, 24] (* Bruno Berselli, Nov 11 2011 *)
PROG
(Maxima) makelist(expand(((-(-1)^n-sqrt(11))*(10-3*sqrt(11))^floor(n/2)+(-(-1)^n+sqrt(11))*(10+3*sqrt(11))^floor(n/2))/2), n, 1, 24); /* Bruno Berselli, Nov 14 2011 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sture Sjöstedt, Oct 31 2011
EXTENSIONS
More terms from Bruno Berselli, Nov 04 2011
STATUS
approved