OFFSET
1,1
COMMENTS
LINKS
Colin Barker, Table of n, a(n) for n = 1..251
Index entries for linear recurrences with constant coefficients, signature (9603,-9603,1).
FORMULA
G.f.: -8*x*(x^2+198*x+1) / ((x-1)*(x^2-9602*x+1)).
EXAMPLE
8 is in the sequence because 8 is the 2nd octagonal number, and 2*8 is the 4th square.
MATHEMATICA
LinearRecurrence[{9603, -9603, 1}, {8, 78408, 752875208}, 20] (* Vincenzo Librandi, Jun 20 2015 *)
PROG
(PARI) Vec(-8*x*(x^2+198*x+1)/((x-1)*(x^2-9602*x+1)) + O(x^20))
(Magma) I:=[8, 78408, 752875208]; [n le 3 select I[n] else 9603*Self(n-1)-9603*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 20 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Jun 19 2015
STATUS
approved