OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (9, -36, 84, -126, 126, -84, 36, -9, 1).
FORMULA
G.f.: (x^8-8*x^7+28*x^6-56*x^5+71*x^4-60*x^3+34*x^2-11*x+2) / (1-x)^9.
a(0)=2, a(1)=7, a(2)=25, a(3)=81, a(4)=236, a(5)=622, a(6)=1498, a(7)=3334, a(8)=6931, a(n)=9*a(n-1)-36*a(n-2)+84*a(n-3) -126*a(n-4) +126*a(n-5) -84*a(n-6) +36*a(n-7) -9*a(n-8) +a(n-9). - Harvey P. Dale, Dec 25 2011
MAPLE
a:= n-> 2+ (89040+ (71868+ (29932+ (8449+ (1960+ (322+ (28+ n) *n) *n) *n) *n) *n) *n) *n/40320: seq (a(n), n=0..40);
MATHEMATICA
Table[2+(89040+(71868+(29932+(8449+(1960+(322+(28+n)n)n)n)n)n)n)n/40320, {n, 0, 40}] (* or *) LinearRecurrence[{9, -36, 84, -126, 126, -84, 36, -9, 1}, {2, 7, 25, 81, 236, 622, 1498, 3334, 6931}, 40](* Harvey P. Dale, Dec 25 2011 *)
CoefficientList[Series[(x^8 - 8 x^7 + 28 x^6 - 56 x^5 + 71 x^4 - 60 x^3 + 34 x^2 - 11 x + 2) / (1 - x)^9, {x, 0, 50}], x] (* Vincenzo Librandi, Jun 06 2013 *)
PROG
(PARI) a(n)=2+(89040+(71868+(29932+(8449+(1960+(322+(28+n)*n)*n)*n)*n)*n)*n)*n/40320 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Oct 03 2008
STATUS
approved