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.

A106522 A Pascal type matrix based on the tribonacci numbers.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 4, 4, 3, 1, 7, 8, 7, 4, 1, 13, 15, 15, 11, 5, 1, 24, 28, 30, 26, 16, 6, 1, 44, 52, 58, 56, 42, 22, 7, 1, 81, 96, 110, 114, 98, 64, 29, 8, 1, 149, 177, 206, 224, 212, 162, 93, 37, 9, 1, 274, 326, 383, 430, 436, 374, 255, 130, 46, 10, 1, 504, 600, 709, 813, 866, 810, 629, 385, 176, 56, 11, 1
Offset: 0

Views

Author

Paul Barry, May 06 2005

Keywords

Comments

Row sums of A106522 mod 2 are A106524.

Examples

			Triangle begins:
   1;
   1,  1;
   2,  2,  1;
   4,  4,  3,  1;
   7,  8,  7,  4, 1;
  13, 13, 15, 11, 5, 1;
		

Crossrefs

Cf. A000073, A001590 (row sums), A106523 (diagonal sums).

Programs

  • Mathematica
    b[n_]:= b[n]= If[n<2, 0, If[n==2, 1, b[n-1] +b[n-2] +b[n-3]]]; (* A000073 *)
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[k==0, b[n+2], T[n-1, k-1] +T[n-1, k]]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Aug 06 2021 *)
  • Sage
    @CachedFunction
    def b(n): return 0 if (n<2) else 1 if (n==2) else b(n-1) +b(n-2) +b(n-3)
    def T(n,k):
        if (k<0 or k>n): return 0
        elif (k==0): return b(n+2)
        else: return T(n-1, k) + T(n-1, k-1)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Aug 06 2021

Formula

Riordan array (1/(1-x-x^2-x^3), x/(1-x)).
Number triangle T(n, 0) = A000073(n+2), T(n, k) = T(n-1, k-1) + T(n-1, k).
Sum_{k=0..n} T(n,k) = A001590(n+3).
Sum_{k=0..floor(n/2)} T(n-k, k) = A106523(n).
Showing 1-1 of 1 results.