OFFSET
0,3
COMMENTS
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
O.g.f.: x*(1 - x + 5*x^2 - 2*x^3)/(1 - x)^5.
E.g.f.: x*(8 + 8*x + 8*x^2 + x^3)*exp(x)/8.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n>4.
a(n) = 2*n + Sum_{i=0..n} i*(i^2 - 3)/2.
EXAMPLE
After 0:
1 = -(0) + (1);
4 = -(0 + 1) + (2 + 2*3/2);
15 = -(0 + 1 + 2) + (3 + 4 + 5 + 3*4/2);
43 = -(0 + 1 + 2 + 3) + (4 + 5 + 6 + 7 + 8 + 9 + 4*5/2);
100 = -(0 + 1 + 2 + 3 + 4) + (5 + 6 + 7 + 8 + ... + 14 + 5*6/2);
201 = -(0 + 1 + 2 + 3 + 4 + 5) + (6 + 7 + 8 + 9 + ... + 20 + 6*7/2), etc.
MAPLE
a := n -> n*(n*(n*(n+2)-5)+10)/8: seq(a(n), n=0..41); # Peter Luschny, Nov 06 2017
MATHEMATICA
Table[n (n^3 + 2 n^2 - 5 n + 10)/8, {n, 0, 50}]
LinearRecurrence[{5, -10, 10, -5, 1}, {0, 1, 4, 15, 43}, 50] (* Harvey P. Dale, Jan 08 2024 *)
PROG
(PARI) vector(50, n, n--; n*(n^3+2*n^2-5*n+10)/8)
(Sage) [n*(n^3+2*n^2-5*n+10)/8 for n in range(50)]
(Maxima) makelist(n*(n^3+2*n^2-5*n+10)/8, n, 0, 50);
(Magma) [n*(n^3+2*n^2-5*n+10)/8: n in [0..50]];
(GAP) List([0..50], n -> n*(n^3+2*n^2-5*n+10)/8);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Oct 30 2017
STATUS
approved