A152031 a(n) = n^5 + n^4 + n^3 + n^2 + n.
0, 5, 62, 363, 1364, 3905, 9330, 19607, 37448, 66429, 111110, 177155, 271452, 402233, 579194, 813615, 1118480, 1508597, 2000718, 2613659, 3368420, 4288305, 5399042, 6728903, 8308824, 10172525, 12356630, 14900787, 17847788, 21243689, 25137930, 29583455
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (6, -15, 20, -15, 6, -1).
Programs
-
Maple
a:= n-> `if`(n=1, 5, (n^6-n)/(n-1)): seq(a(n), n=0..35); # Alois P. Heinz, Aug 20 2013
-
Mathematica
lst={};Do[AppendTo[lst,n^5+n^4+n^3+n^2+n],{n,0,5!}];lst (* Other programs: *) Table[Total[n^Range@ 5], {n, 0, 31}] (* or *) CoefficientList[Series[x (5 + 32 x + 66 x^2 + 16 x^3 + x^4)/(x - 1)^6, {x, 0, 31}], x] (* Michael De Vlieger, Apr 05 2017 *)
-
PARI
a(n) = n^5 + n^4 + n^3 + n^2 + n; \\ Joerg Arndt, Sep 03 2013
-
Python
def a(n): return n**5 + n**4 + n**2 + n # Indranil Ghosh, Apr 05 2017
-
R
a <- c(0, 5, 62, 363, 1364, 3905) for(n in (length(a)+1):40) 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] a [Yosu Yurramendi, Sep 03 2013]
Formula
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) n>5, a(0)=0, a(1)=5, a(2)=62, a(3)=363, a(4)=1364, a(5)=3905. [Yosu Yurramendi, Sep 03 2013]
From Indranil Ghosh, Apr 05 2017: (Start)
G.f.: x*(5 + 32x + 66x^2 + 16x^3 + x^4)/(x - 1)^6.
E.g.f.: exp(x)*x*(5 + 26x + 32x^2 + 11x^3 + x^4).
(End)
a(n) = n*A053699(n). - Michel Marcus, Apr 05 2017