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.

A295555 Generalized Pascal triangle read by rows: add the four terms that are right above you, three rows back.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 3, 4, 3, 2, 1, 1, 3, 5, 7, 7, 5, 3, 1, 1, 3, 6, 9, 10, 9, 6, 3, 1, 1, 3, 6, 10, 12, 12, 10, 6, 3, 1, 1, 4, 9, 16, 22, 24, 22, 16, 9, 4, 1, 1, 4, 10, 19, 28, 34, 34, 28, 19, 10, 4, 1, 1, 4, 10, 20, 31, 40, 44, 40, 31, 20, 10, 4, 1
Offset: 0

Views

Author

N. J. A. Sloane, Nov 23 2017

Keywords

Comments

To explain the rule of formation, consider the first few rows of the triangle, which are:
1
1, 1
1, 1, 1
1, 1, 1, 1
A, B, C, D, 1
1, 2, 3, 3, 2, 1
1, 2, 3, 4, 3, 2, 1
1, 3, 5, E, 7, 5, 3, 1
The left and right edge are all 1's, the entries outside the triangle are all 0's, and the first 3 rows are all 1's.
Thereafter each term E (say) is the sum of the 4 terms A, B, C, D exactly above it three rows back.
Adding the two entries just above you in the previous row gives Pascal's triangle, A007318. Adding the three entries just above you two rows back gives A169623.
From Peter Bala, Aug 19 2021: (Start)
Let M denote the lower unit triangular array with the sequence [1,0,0,1,0,0,1,...] on all the subdiagonals. For k = 0,1,2,..., define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/
having the k X k identity matrix I_k as the upper left block; in particular, M(0) = M. Then the present triangle equals the infinite matrix product M(0)*M(1)*M(2)*... (which is clearly well-defined). See the Example section below. The proof uses the hockey-stick identities from the Formula section. (End)

Examples

			Triangle begins:
                    1
                  1,  1
                1,  1,  1
              1,  1,  1,  1
            1,  2,  2,  2,  1
          1,  2,  3,  3,  2,  1
        1,  2,  3,  4,  3,  2,  1
      1,  3,  5,  7,  7,  5,  3,  1
    1,  3,  6,  9, 10,  9,  6,  3,  1
  1,  3,  6, 10, 12, 12, 10,  6,  3,  1
...
From _Peter Bala_, Aug 19 2021: (Start)
With the arrays M(k) as defined in the Comments section, the infinite product M(0)*M(1)*M(2)*... begins
  /1            \/1            \/1            \      /1         \
  |1 1          ||0 1          ||0 1          |      |1 1       |
  |1 0 1        ||0 1 1        ||0 0 1        |      |1 1 1     |
  |1 0 0 1      ||0 1 0 1      ||0 0 1 1      |... = |1 1 1 1   |
  |1 0 0 1 1    ||0 1 0 0 1    ||0 0 1 0 1    |      |1 2 2 2 1 |
  |1 0 0 1 0 1  ||0 1 0 0 1 1  ||0 0 1 0 0 1  |      |...       |
  |1 0 0 1 0 0 1||0 1 0 0 1 0 1||0 0 1 0 0 1 1|
  |...          ||...          ||...          |
(End)
		

Crossrefs

Row sums are A133464.

Programs

  • Maple
    T:=proc(n,k) option remember;
    if n >= 0 and k = 0 then 1
    elif n >= 0 and k = n then 1
    elif (k < 0 or k > n) then 0
    elif n=2 then 1
    else T(n-3,k-3)+T(n-3,k-2)+T(n-3,k-1)+T(n-3,k);
    fi;
    end;
    for n from 0 to 14 do lprint([seq(T(n,k),k=0..n)]); od:
  • Mathematica
    T[n_, k_] := T[n, k] = Which[
       n >= 0 && k == 0, 1,
       n >= 0 && k == n, 1,
       k < 0 || k > n, 0,
       n == 2, 1,
       True, T[n-3, k-3] + T[n-3, k-2] + T[n-3, k-1] + T[n-3, k]];
    Table[T[n, k], {n, 0, 14}, { k, 0, n}] // Flatten (* Jean-François Alcover, Aug 19 2022, after Maple code *)

Formula

T(n,0)=T(n,n)=1, T(n,k)=0 if k<0 or k>n, also T(2,1)=1; thereafter T(n,k) = T(n-3,k-3) + T(n-3,k-2) + T(n-3,k-1) + T(n-3,k).
From Peter Bala, Aug 19 2021: (Start)
T(3*n,k) = T(3*n-2,k) + T(3*n-2,k-2).
T(3*n+1,k) = T(3*n,k) + T(3*n,k-1).
T(3*n+2,k) = T(3*n+1,k-1) + T(3*n,k).
Hockey-stick identities (relate row k entries to entries in row k-1):
T(3*n,k) = T(3*n-1,k-1) + T(3*n-4,k-1) + T(3*n-7,k-1) + ....
T(3*n+1,k) = T(3*n,k-1) + ( T(3*n-1,k-1) + T(3*n-4,k-1) + T(3*n-7,k-1) + ... ).
T(3*n+2,k) = T(3*n+1,k-1) + ( T(3*n-1,k-1) + T(3*n-4,k-1) + T(3*n-7,k-1) + ... ).
Row polynomials:
R(3*n,x) = R(3,x)^n = (1 + x + x^2 + x^3)^n.
R(3*n+1,x) = R(1,x)*R(3,x)^n = (1 + x)*(1 + x + x^2 + x^3)^n.
R(3*n+2,x) = R(2,x)*R(3,x)^n = (1 + x + x^2)*(1 + x + x^2 + x^3)^n. (End)