login
a(n) = Sum_{k=0..11} C(n, k).
11

%I #29 Sep 08 2022 08:46:04

%S 1,2,4,8,16,32,64,128,256,512,1024,2048,4095,8178,16278,32192,63019,

%T 121670,230964,430104,784626,1401292,2449868,4194304,7036530,11576916,

%U 18696432,29666704,46295513,71116846,107636402,160645504,236618693,344212906,494889092

%N a(n) = Sum_{k=0..11} C(n, k).

%C a(n) is the number of compositions (ordered partitions) of n+1 into twelve or fewer parts. a(n) = sum(binomial(n + 1, 2k - 1), for k = 1 .. 6). a(n) is the sum of the first twelve terms in the n-th row of Pascal's triangle.

%H Reinhard Zumkeller, <a href="/A219531/b219531.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (12,-66,220,-495,792,-924,792,-495,220,-66,12,-1).

%F a(n) = 1 + (n^11 - 44*n^10 + 935*n^9 - 11550*n^8 + 94083*n^7 - 497112*n^6 +1870385*n^5 -3920950*n^4 +8550916*n^3 +4429656*n^2 +29400480*n)/11!. a(n) = 2*a(n - 1), for 1 <= n <= 11 with a(0) = 1, a(n) = 2*a(n - 1) - C(n - 1, 11), for n > 11. - Mohamed

%F G.f.: (1 - 10*x + 46*x^2 - 128*x^3 + 239*x^4 - 314*x^5 + 296*x^6 - 200*x^7 + 95*x^8 - 30*x^9 + 6*x^10)/(1-x)^12. - _Mokhtar Mohamed_, Nov 23 2012

%p seq(sum(binomial(n,j), j=0..11), n=0..40); # _G. C. Greubel_, Sep 13 2019

%t Table[Sum[Binomial[n, k], {k, 0, 11}], {n, 0, 40}] (* _T. D. Noe_, Nov 23 2012 *)

%t LinearRecurrence[{12,-66,220,-495,792,-924,792,-495,220,-66,12,-1},{1,2,4,8,16,32,64,128,256,512,1024,2048},40] (* _Harvey P. Dale_, Sep 19 2019 *)

%o (Haskell)

%o a219531 = sum . take 12 . a007318_row -- _Reinhard Zumkeller_, Nov 24 2012

%o (Python)

%o A219531_list, m = [], [1, -9, 37, -91, 148, -166, 130, -70, 25, -5, 1, 1]

%o for _ in range(10**2):

%o A219531_list.append(m[-1])

%o for i in range(11):

%o m[i+1] += m[i] # _Chai Wah Wu_, Jan 24 2016

%o (PARI) vector(40, n, sum(j=0,11, binomial(n-1,j))) \\ _G. C. Greubel_, Sep 13 2019

%o (Magma) [(&+[Binomial(n,k): k in [0..11]]): n in [0..40]]; // _G. C. Greubel_, Sep 13 2019

%o (Sage) [sum(binomial(n,k) for k in (0..11)) for n in (0..40)] # _G. C. Greubel_, Sep 13 2019

%o (GAP) List([0..40], n-> Sum([0..11], k-> Binomial(n,k)) ); # _G. C. Greubel_, Sep 13 2019

%Y Cf. A000127, A006261, A008859, A008860, A008861, A008862, A008863.

%Y Cf. A007318.

%K nonn,easy

%O 0,2

%A _Mokhtar Mohamed_, Nov 21 2012