OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (8, -28, 56, -70, 56, -28, 8, -1).
FORMULA
G.f.: x*(x^6+78*x^5+981*x^4+2332*x^3+1443*x^2+198*x+7)/(x-1)^8.
a(1) = 7, else a(n) = (n^8-n)/(n-1).
a(n) = 8*a(n-1) - 28*a(n-2) + 56*a(n-3) - 70*a(n-4) + 56*a(n-5) - 28*a(n-6) + 8*a(n-7) - a(n-8) with n > 7, a(0)=0, a(1)=7, a(2)=254, a(3)=3279, a(4)=21844, a(5)=97655, a(6)=335922, a(7)=960799. - Yosu Yurramendi, Sep 03 2013
MAPLE
a:= n-> `if`(n=1, 7, (n^8-n)/(n-1)):
seq(a(n), n=0..30);
MATHEMATICA
Table[Total[n^Range[7]], {n, 0, 30}] (* or *) LinearRecurrence[{8, -28, 56, -70, 56, -28, 8, -1}, {0, 7, 254, 3279, 21844, 97655, 335922, 960799}, 30] (* Harvey P. Dale, Dec 06 2018 *)
PROG
(R)
a <- c(0, 7, 254, 3279, 21844, 97655, 335922, 960799)
for(n in (length(a)+1):30) a[n] <- 8*a[n-1] -28*a[n-2] +56*a[n-3] -70*a[n-4] +56*a[n-5] -28*a[n-6] +8*a[n-7] -a[n-8]
a [Yosu Yurramendi, Sep 03 2013]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Aug 19 2013
STATUS
approved