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.

A123736 Triangle T(n,k) = Sum_{j=0..k/2} binomial(n-j-1,k-2*j), read by rows.

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 1, 2, 2, 1, 1, 0, 1, 3, 4, 3, 2, 1, 1, 0, 1, 4, 7, 7, 5, 3, 2, 1, 1, 0, 1, 5, 11, 14, 12, 8, 5, 3, 2, 1, 1, 0, 1, 6, 16, 25, 26, 20, 13, 8, 5, 3, 2, 1, 1, 0, 1, 7, 22, 41, 51, 46, 33, 21, 13, 8, 5, 3, 2, 1, 1, 0, 1, 8, 29, 63, 92, 97, 79, 54, 34, 21, 13, 8, 5, 3, 2, 1, 1, 0, 1
Offset: 1

Views

Author

Roger L. Bagula, Nov 14 2006

Keywords

Comments

Row sums give: A000225

Examples

			The triangle starts in row n=1 with columns 0 <= k < 2*n:
  1, 0;
  1, 1,  1,  0;
  1, 2,  2,  1,  1,  0;
  1, 3,  4,  3,  2,  1,  1,  0;
  1, 4,  7,  7,  5,  3,  2,  1,  1,  0;
  1, 5, 11, 14, 12,  8,  5,  3,  2,  1,  1, 0;
  1, 6, 16, 25, 26, 20, 13,  8,  5,  3,  2, 1, 1, 0;
  1, 7, 22, 41, 51, 46, 33, 21, 13,  8,  5, 3, 2, 1, 1, 0;
  1, 8, 29, 63, 92, 97, 79, 54, 34, 21, 13, 8, 5, 3, 2, 1, 1, 0;
		

Crossrefs

Cf. A136431 (antidiagonals), A027926 (row-reversed), A004006 (column m=3)

Programs

  • GAP
    Flat(List([1..10], n-> List([0..2*n-1], k-> Sum([0..Int(k/2)], j-> Binomial(n-j-1, k-2*j) )))); # G. C. Greubel, Sep 05 2019
  • Magma
    [&+[Binomial(n-j-1, k-2*j): j in [0..Floor(k/2)]]: k in [0..2*n-1], n in [1..10]]; // G. C. Greubel, Sep 05 2019
    
  • Maple
    seq(seq(sum(binomial(n-j-1, k-2*j), j=0..floor(k/2)), k=0..2*n-1), n=1..10); # G. C. Greubel, Sep 05 2019
  • Mathematica
    Table[Sum[Binomial[n-j-1, k-2*j], {j,0,Floor[k/2]}], {n, 10}, {k, 0, 2*n-1}]//Flatten (* modified by G. C. Greubel, Sep 05 2019 *)
  • PARI
    T(n,k) = sum(j=0, k\2, binomial(n-j-1, k-2*j));
    for(n=1,10, for(k=0,2*n-1, print1(T(n,k), ", "))) \\ G. C. Greubel, Sep 05 2019
    
  • Sage
    [[sum(binomial(n-j-1, k-2*j) for j in (0..floor(k/2))) for k in (0..2*n-1)] for n in (1..10)] # G. C. Greubel, Sep 05 2019