OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,-15,20,-15,6,-1).
FORMULA
G.f.: (1 - 7 x + 38 x^2 + 62 x^3 + 25 x^4 + x^5)/(1 - x)^6. - Vincenzo Librandi, May 03 2014
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6) for n>5.
MATHEMATICA
CoefficientList[Series[(1 - 7 x + 38 x^2 + 62 x^3 + 25 x^4 + x^5)/(1 - x)^6, {x, 0, 40}], x] (* Vincenzo Librandi, May 03 2014 *)
Table[n^5-n^3-2n^2+1, {n, 0, 50}] (* or *) LinearRecurrence[{6, -15, 20, -15, 6, -1}, {1, -1, 17, 199, 929, 2951}, 50] (* Harvey P. Dale, Aug 25 2023 *)
PROG
(PARI) a(n)=n^5-n^3-2*n^2+1 \\ Charles R Greathouse IV, Jan 11 2012
(Magma) [n^5-n^3-2*n^2+1: n in [0..40]]; // Vincenzo Librandi, May 03 2014
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Vincenzo Librandi, Jun 05 2010
STATUS
approved