A008861 a(n) = Sum_{k=0..8} binomial(n,k).
1, 2, 4, 8, 16, 32, 64, 128, 256, 511, 1013, 1981, 3797, 7099, 12911, 22819, 39203, 65536, 106762, 169766, 263950, 401930, 600370, 880970, 1271626, 1807781, 2533987, 3505699, 4791323, 6474541, 8656937, 11460949, 15033173, 19548046
Offset: 0
Examples
a(9)=511 because all but one (namely 1+1+1+...+1=10) of the 2^9 compositions of 10 are in nine or fewer parts. - _Geoffrey Critzer_, Jan 24 2009
References
- L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 72, Problem 2.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
- Index entries for linear recurrences with constant coefficients, signature (9,-36,84,-126,126,-84,36,-9,1).
Programs
-
GAP
List([0..40], n-> Sum([0..8], k-> Binomial(n,k)) ); # G. C. Greubel, Sep 13 2019
-
Haskell
a008861 = sum . take 9 . a007318_row -- Reinhard Zumkeller, Nov 24 2012
-
Magma
[(&+[Binomial(n,k): k in [0..8]]): n in [0..40]]; // G. C. Greubel, Sep 13 2019
-
Maple
seq(sum(binomial(n,j), j=0..8), n=0..40); # G. C. Greubel, Sep 13 2019
-
Mathematica
Sum[Binomial[Range[41]-1, j-1], {j,9}] (* G. C. Greubel, Sep 13 2019 *)
-
PARI
vector(40, n, sum(j=0,8, binomial(n-1,j))) \\ G. C. Greubel, Sep 13 2019
-
Sage
[sum(binomial(n,k) for k in (0..8)) for n in (0..40)] # G. C. Greubel, Sep 13 2019
Formula
a(n) = Sum_{k=0..4} binomial(n+1, 2*k), compare A008859.
From Geoffrey Critzer, Jan 24 2009: (Start)
G.f.: (1 - 7*x + 22*x^2 - 40*x^3 + 46*x^4 - 34*x^5 + 16*x^6 - 4*x^7 + x^8)/(1-x)^9.
a(n) = (n^8 - 20*n^7 + 210*n^6 - 1064*n^5 + 3969*n^4 - 4340*n^3 + 15980*n^2 + 25584*n + 40320)/8!. (End)
Comments