OFFSET
0,1
REFERENCES
Clark Kimberling, Complementary Equations, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.4.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Clark Kimberling, Complementary Equations, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.4.
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
G.f.: 2*(1 -4*x +14*x^2 +4*x^3 +9*x^4)/(1-x)^5.
a(n) = 2*(n^2 - n + 1)^2.
a(n) = 2*A058031(n).
E.g.f.: 2*(1 + 4*x^2 + 4*x^3 + x^4)*exp(x). - G. C. Greubel, Jul 07 2021
MAPLE
a:= n-> 2*(n^2-n+1)^2:
seq (a(n), n=0..40);
MATHEMATICA
Table[2*(1-n+n^2)^2, {n, 0, 40}] (* G. C. Greubel, Jul 07 2021 *)
LinearRecurrence[{5, -10, 10, -5, 1}, {2, 2, 18, 98, 338}, 50] (* Harvey P. Dale, Apr 20 2024 *)
PROG
(Sage) [2*(1-n+n^2)^2 for n in (0..40)] # G. C. Greubel, Jul 07 2021
(PARI) a(n)=2*(n^2-n+1)^2 \\ Charles R Greathouse IV, Oct 21 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michel Lagneau, Feb 24 2010
EXTENSIONS
Edited by Alois P. Heinz, Feb 16 2012
STATUS
approved