A008862 a(n) = Sum_{k=0..9} binomial(n,k).
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1023, 2036, 4017, 7814, 14913, 27824, 50643, 89846, 155382, 262144, 431910, 695860, 1097790, 1698160, 2579130, 3850756, 5658537, 8192524, 11698223, 16489546, 22964087, 31621024, 43081973, 58115146, 77663192, 102875128
Offset: 0
Examples
a(10)=1023 because there are (2^10)-1 compositions of 11 into ten 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 (10,-45,120,-210,252,-210,120,-45,10,-1).
Programs
-
GAP
List([0..40], n-> Sum([0..9], k-> Binomial(n,k)) ); # G. C. Greubel, Sep 13 2019
-
Haskell
a008862 = sum . take 10 . a007318_row -- Reinhard Zumkeller, Nov 24 2012
-
Magma
[(&+[Binomial(n,k): k in [0..9]]): n in [0..40]]; // G. C. Greubel, Sep 13 2019
-
Maple
seq(add(binomial(n,j), j=0..9), n=0..40); # G. C. Greubel, Sep 13 2019
-
Mathematica
Table[Sum[Binomial[n,k],{k,0,9}],{n,0,40}] (* or *) LinearRecurrence[ {10,-45,120,-210,252,-210,120,-45,10,-1}, {1,2,4,8,16,32,64,128,256, 512}, 40] (* Harvey P. Dale, Mar 18 2012 *)
-
PARI
vector(40, n, sum(j=0,9, binomial(n-1,j))) \\ G. C. Greubel, Sep 13 2019
-
Sage
[sum(binomial(n,k) for k in (0..9)) for n in (0..40)] # G. C. Greubel, Sep 13 2019
Formula
a(n) = Sum_{k=1..5} binomial(n+1, 2*k-1), compare A008860.
From Geoffrey Critzer, Jan 24 2009: (Start)
G.f.: (1 - 8*x + 29*x^2 - 62*x^3 + 86*x^4 - 80*x^5 + 50*x^6 - 20*x^7 + 5*x^8)/(1-x)^10.
a(n) = (n^9 - 27*n^8 + 366*n^7 - 2646*n^6 + 12873*n^5 - 31563*n^4 + 79064*n^3 + 34236*n^2 + 270576*n + 362880)/9!. (End)
a(n) = 10*a(n-1) - 45*a(n-2) + 120*a(n-3) - 210*a(n-4) + 252*a(n-5) - 210*a(n-6) + 120*a(n-7) - 45*a(n-8) + 10*a(n-9) - a(n-10); a(0)=1, a(1)=2, a(2)=4, a(3)=8, a(4)=16, a(5)=32, a(6)=64, a(7)=128, a(8)=256, a(9)=512. - Harvey P. Dale, Mar 18 2012
Comments