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.

A172171 (1, 9) Pascal Triangle read by horizontal rows. Same as A093644, but mirrored and without the additional row/column (1, 9, 9, 9, 9, ...).

Original entry on oeis.org

1, 1, 10, 1, 11, 19, 1, 12, 30, 28, 1, 13, 42, 58, 37, 1, 14, 55, 100, 95, 46, 1, 15, 69, 155, 195, 141, 55, 1, 16, 84, 224, 350, 336, 196, 64, 1, 17, 100, 308, 574, 686, 532, 260, 73, 1, 18, 117, 408, 882, 1260, 1218, 792, 333, 82
Offset: 1

Views

Author

Mark Dols, Jan 28 2010

Keywords

Comments

Binomial transform of A017173.

Examples

			Triangle begins:
  1;
  1, 10;
  1, 11,  19;
  1, 12,  30,  28;
  1, 13,  42,  58,   37;
  1, 14,  55, 100,   95,   46;
  1, 15,  69, 155,  195,  141,   55;
  1, 16,  84, 224,  350,  336,  196,   64;
  1, 17, 100, 308,  574,  686,  532,  260,   73;
  1, 18, 117, 408,  882, 1260, 1218,  792,  333,   82;
  1, 19, 135, 525, 1290, 2142, 2478, 2010, 1125,  415,  91;
  1, 20, 154, 660, 1815, 3432, 4620, 4488, 3135, 1540, 506, 100;
		

Crossrefs

Cf. A007318, A017173, A050489 (central terms), A093644, A139634 (row sums).

Programs

  • Mathematica
    T[n_, k_]:= T[n, k]= If[k<1 || k>n, 0, If[k==1, 1, If[n==2 && k==2, 10, T[n-1, k] + 2*T[n-1, k-1] - T[n-2, k-1] - T[n-2, k-2]]]];
    Table[T[n, k], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Apr 24 2022 *)
  • SageMath
    @CachedFunction
    def T(n,k):
        if (k<1 or k>n): return 0
        elif (k==1): return 1
        elif (n==2 and k==2): return 10
        else: return T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k-1) - T(n-2,k-2)
    flatten([[T(n,k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Apr 24 2022

Formula

T(n,k) = T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k-1) - T(n-2,k-2), T(n,1) = 1, T(2,2) = 10, T(n,k) = 0 if k < 1 or if k > n.
Sum_{k=0..n} T(n, k) = A139634(n).
T(2*n-1, n) = A050489(n).

Extensions

More terms from Philippe Deléham, Dec 25 2013