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.

A034868 Left half of Pascal's triangle.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 6, 1, 5, 10, 1, 6, 15, 20, 1, 7, 21, 35, 1, 8, 28, 56, 70, 1, 9, 36, 84, 126, 1, 10, 45, 120, 210, 252, 1, 11, 55, 165, 330, 462, 1, 12, 66, 220, 495, 792, 924, 1, 13, 78, 286, 715, 1287, 1716, 1, 14, 91, 364, 1001, 2002, 3003, 3432, 1, 15
Offset: 0

Views

Author

Keywords

Examples

			1;
1;
1, 2;
1, 3;
1, 4,  6;
1, 5, 10;
1, 6, 15, 20;
...
		

Crossrefs

Cf. A007318, A107430, A062344, A122366, A027306 (row sums).
Cf. A008619.
Cf. A225860.
Cf. A126257.
Cf. A034869 (right half), A014413, A014462, A265848.

Programs

  • Haskell
    a034868 n k = a034868_tabf !! n !! k
    a034868_row n = a034868_tabf !! n
    a034868_tabf = map reverse a034869_tabf
    -- Reinhard Zumkeller, improved Dec 20 2015, Jul 27 2012
    
  • Mathematica
    Flatten[ Table[ Binomial[n, k], {n, 0, 15}, {k, 0, Floor[n/2]}]] (* Robert G. Wilson v, May 28 2005 *)
  • PARI
    for(n=0, 14, for(k=0, floor(n/2), print1(binomial(n, k),", ");); print();) \\ Indranil Ghosh, Mar 31 2017
    
  • Python
    import math
    from sympy import binomial
    for n in range(15):
        print([binomial(n, k) for k in range(int(math.floor(n/2)) + 1)]) # Indranil Ghosh, Mar 31 2017
    
  • Python
    from itertools import count, islice
    def A034868_gen(): # generator of terms
        yield from (s:=(1,))
        for i in count(0):
            yield from (s:=(1,)+tuple(s[j]+s[j+1] for j in range(len(s)-1)) + ((s[-1]<<1,) if i&1 else ()))
    A034868_list = list(islice(A034868_gen(),30)) # Chai Wah Wu, Oct 17 2023

Formula

T(n,k) = A034869(n,floor(n/2)-k), k = 0..floor(n/2). - Reinhard Zumkeller, Jul 27 2012