OFFSET
-1,2
COMMENTS
Squares in the sequence: 1, 9, 5329, for n = -1, 1, 11 respectively. No other square for n < 9*10^9.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = -1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: (-1 + 9*x - 17*x^2 + 35*x^3 - 2*x^4)/(1 - x)^4.
a(n) = 4*a(n-1)-6*a(n-2)+4*a(n-3)-a(n-4) for n>3.
a(n) = A033430(n-1) + 5. - Wesley Ivan Hurt, Jun 10 2014
MAPLE
MATHEMATICA
Table[4 n^3 + 5, {n, -1, 50}] (* or *) CoefficientList[Series[(-1 + 9 x - 17 x^2 + 35 x^3 - 2 x^4)/(1 - x)^4, {x, 0, 40}], x]
PROG
(Magma) [4*n^3+5: n in [-1..40]]; /* or */ I:=[1, 5, 9, 37]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Jun 10 2014
STATUS
approved