cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4095, 8178, 16278, 32192, 63019, 121670, 230964, 430104, 784626, 1401292, 2449868, 4194304, 7036530, 11576916, 18696432, 29666704, 46295513, 71116846, 107636402, 160645504, 236618693, 344212906, 494889092
Offset: 0

Views

Author

Mokhtar Mohamed, Nov 21 2012

Keywords

Comments

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.

Crossrefs

Programs

  • GAP
    List([0..40], n-> Sum([0..11], k-> Binomial(n,k)) ); # G. C. Greubel, Sep 13 2019
  • Haskell
    a219531 = sum . take 12 . a007318_row  -- Reinhard Zumkeller, Nov 24 2012
    
  • Magma
    [(&+[Binomial(n,k): k in [0..11]]): n in [0..40]]; // G. C. Greubel, Sep 13 2019
    
  • Maple
    seq(sum(binomial(n,j), j=0..11), n=0..40); # G. C. Greubel, Sep 13 2019
  • Mathematica
    Table[Sum[Binomial[n, k], {k, 0, 11}], {n, 0, 40}] (* T. D. Noe, Nov 23 2012 *)
    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 *)
  • PARI
    vector(40, n, sum(j=0,11, binomial(n-1,j))) \\ G. C. Greubel, Sep 13 2019
    
  • Python
    A219531_list, m = [], [1, -9, 37, -91, 148, -166, 130, -70, 25, -5, 1, 1]
    for _ in range(10**2):
        A219531_list.append(m[-1])
        for i in range(11):
            m[i+1] += m[i] # Chai Wah Wu, Jan 24 2016
    
  • Sage
    [sum(binomial(n,k) for k in (0..11)) for n in (0..40)] # G. C. Greubel, Sep 13 2019
    

Formula

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
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