OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4, -6, 4, -1).
FORMULA
G.f.: (1 - 3*x + 11*x^2 - 3*x^3)/(1-x)^4. - R. J. Mathar, Nov 24 2009
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - G. C. Greubel, Jul 17 2016
MATHEMATICA
Table[n^3 + (1 - n)^2, {n, 0, 50}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {1, 1, 9, 31}, 50] (* G. C. Greubel, Jul 17 2016 *)
PROG
(Magma) [n^3+(1-n)^2: n in [0..40]]; // Vincenzo Librandi, Jul 18 2016
(PARI) a(n)=n^3+(n-1)^2 \\ Charles R Greathouse IV, Oct 18 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Nov 22 2009
EXTENSIONS
Flipped/normalized the sign of n - R. J. Mathar, Nov 24 2009
Further edited by N. J. A. Sloane, Nov 24 2009
STATUS
approved
