OFFSET
1,2
COMMENTS
When are both n+1 and 13*n+1 perfect squares? This problem gives the equation 13*x^2-12=y^2.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (0,11,0,-1).
FORMULA
a(n+4) = 11*a(n+2)-a(n) with a(1)=1, a(2)=14, a(3)=25, a(4)=155.
G.f.: x*(1+x)*(1+13*x+x^2)/((1+3*x-x^2)*(1-3*x-x^2)). - Bruno Berselli, Nov 08 2011
a(n) = 2^(-1-n)*(2*(3-sqrt(13))^n+(-3-sqrt(13))^n*(-3+sqrt(13))-3*(-3+sqrt(13))^n-sqrt(13)*(-3+sqrt(13))^n+2*(3+sqrt(13))^n). - Colin Barker, Mar 27 2016
MATHEMATICA
LinearRecurrence[{0, 11, 0, -1}, {1, 14, 25, 155}, 50] (* Bruno Berselli, Nov 08 2011 *)
PROG
(Magma) m:=27; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1+x)*(1+13*x+x^2)/((1+3*x-x^2)*(1-3*x-x^2)))); // Bruno Berselli, Nov 08 2011
(PARI) Vec(x*(1+x)*(1+13*x+x^2)/((1+3*x-x^2)*(1-3*x-x^2)) + O(x^50)) \\ Colin Barker, Mar 27 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Sture Sjöstedt, Nov 05 2011
EXTENSIONS
More terms from Bruno Berselli, Nov 08 2011
STATUS
approved