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.

A103516 Triangle read by rows: count in a vee.

Original entry on oeis.org

1, 2, 2, 3, 0, 3, 4, 0, 0, 4, 5, 0, 0, 0, 5, 6, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 8, 9, 0, 0, 0, 0, 0, 0, 0, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Paul Barry, Feb 09 2005

Keywords

Comments

Row sums are A103517, antidiagonal sums are A187012.

Examples

			Triangle begins
1,
2, 2,
3, 0, 3,
4, 0, 0, 4,
5, 0, 0, 0, 5,
6, 0, 0, 0, 0, 6,
7, 0, 0, 0, 0, 0, 7,
8, 0, 0, 0, 0, 0, 0, 8,
...
		

Programs

  • Mathematica
    Join[{1},Flatten[Table[Flatten[Join[{n,PadRight[{},n-2,0],n}]],{n,2,15}]]] (* Harvey P. Dale, Mar 23 2013 *)
  • PARI
    tabl(nn) = {for (i=1, nn, for (j=1, i, if (j == 1, t = i, if (j==i, t = i, t = 0)); print1(t, ", ");); print(););} \\ Michel Marcus, Aug 30 2013

Formula

Number triangle T(n, k)=if(k<=n, 0^(k(n-k))*(n+1), 0)