OFFSET
1,2
COMMENTS
When are n and 11*n+1 perfect squares? This problem gives rise to the Diophantine equation 11*x^2 - 10 = y^2.
Positive values of x (or y) satisfying x^2 - 20xy + y^2 + 90 = 0. - Colin Barker, Feb 18 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
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)=7, a(3)=13, a(4)=139.
From Bruno Berselli, Nov 06 2011: (Start)
G.f.: x*(1-x)*(1+8*x+x^2)/(1-20*x^2+x^4).
a(n) = ((11+(-1)^n*t)*(10-3*t)^floor(n/2)+(11-(-1)^n*t)*(10+3*t)^floor(n/2))/22 with t=sqrt(11). (End).
MATHEMATICA
LinearRecurrence[{0, 20, 0, -1}, {1, 7, 13, 139}, 30] (* Vincenzo Librandi, Feb 06 2012 *)
PROG
(PARI) v=vector(25); v[1]=1; v[2]=7; v[3]=13; v[4]=139; for(i=5, #v, v[i]=20*v[i-2]-v[i-4]); v \\ Bruno Berselli, Nov 07 2011
(Magma) m:=26; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1-x)*(1+8*x+x^2)/(1-20*x^2+x^4))); // Bruno Berselli, Nov 07 2011
(Maxima) makelist(expand(((11+(-1)^n*sqrt(11))*(10-3*sqrt(11))^floor(n/2)+(11-(-1)^n*sqrt(11))*(10+3*sqrt(11))^floor(n/2))/22), n, 1, 25); /* Bruno Berselli, Nov 07 2011 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sture Sjöstedt, Oct 31 2011
EXTENSIONS
Terms a(1)-a(7) confirmed, a(8)-a(15) added by John W. Layman, Nov 04 2011
a(16)-a(25) from Bruno Berselli, Nov 06 2011
STATUS
approved