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.

Showing 1-1 of 1 results.

A335262 Triangle of triangular numbers, read by rows, constructed like this: Given a sequence t, start row 0 with t(0). Compute row n for n > 0 by reversing row n-1 and prepending t(n). The sequence t is here chosen as the triangular numbers.

Original entry on oeis.org

0, 1, 0, 3, 0, 1, 6, 1, 0, 3, 10, 3, 0, 1, 6, 15, 6, 1, 0, 3, 10, 21, 10, 3, 0, 1, 6, 15, 28, 15, 6, 1, 0, 3, 10, 21, 36, 21, 10, 3, 0, 1, 6, 15, 28, 45, 28, 15, 6, 1, 0, 3, 10, 21, 36, 55, 36, 21, 10, 3, 0, 1, 6, 15, 28, 45, 66, 45, 28, 15, 6, 1, 0, 3, 10, 21, 36, 55
Offset: 0

Views

Author

Peter Luschny, May 29 2020

Keywords

Examples

			Triangle starts:
                               0;
                              1, 0;
                            3, 0, 1;
                           6, 1, 0, 3;
                         10, 3, 0, 1, 6;
                       15, 6, 1, 0, 3, 10;
                     21, 10, 3, 0, 1, 6, 15;
                   28, 15, 6, 1, 0, 3, 10, 21;
                 36, 21, 10, 3, 0, 1, 6, 15, 28;
               45, 28, 15, 6, 1, 0, 3, 10, 21, 36;
             55, 36, 21, 10, 3, 0, 1, 6, 15, 28, 45;
           66, 45, 28, 15, 6, 1, 0, 3, 10, 21, 36, 55;
         78, 55, 36, 21, 10, 3, 0, 1, 6, 15, 28, 45, 66;
		

Crossrefs

Row sums give the triangular pyramidal numbers A000292.
Cf. A000217 (triangular numbers), A112367, A181940.

Programs

  • Maple
    T := (n,k) -> pochhammer(2*k - 1 - n, 2)/2:
    seq(seq(T(n,k), k=0..n), n=0..11);
  • PARI
    T(n, k) = (2*k-1-n)*(2*k-n)/2;
    tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n,k), ", ")); print); \\ Michel Marcus, May 29 2020
  • Python
    def T(num_rows):
        t, s = 1, 1
        L, R = [0], [0]
        for n in range(1, num_rows):
            R.reverse()
            R.insert(0, t)
            L.extend(R)
            t, s = t+s+1, s+1
        return L
    print(T(12))
    

Formula

T(n, k) = Pochhammer(2*k - 1 - n, 2) / 2!.
Row n is generated by the quadratic polynomial 2*x^2 - (2*n+5)*x + t(n+2), where t(n) are the triangular numbers, evaluated at x = k + 1.
T(n, k) = (2*k-1-n)*(2*k-n)/2. - Michel Marcus, May 29 2020
Showing 1-1 of 1 results.