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.

A123097 Triangle read by rows: T(n,k) = binomial(n-2, k-1) + n*binomial(n-1, k-1), 1 <= k <= n, starting with T(1, 1) = 1.

Original entry on oeis.org

1, 3, 2, 4, 7, 3, 5, 14, 13, 4, 6, 23, 33, 21, 5, 7, 34, 66, 64, 31, 6, 8, 47, 115, 150, 110, 43, 7, 9, 62, 183, 300, 295, 174, 57, 8, 10, 79, 273, 539, 665, 525, 259, 73, 9, 11, 98, 388, 896, 1330, 1316, 868, 368, 91, 10, 12, 119, 531, 1404, 2436, 2898, 2394, 1356, 504, 111, 11
Offset: 1

Views

Author

Gary W. Adamson and Roger L. Bagula, Nov 05 2006

Keywords

Comments

Triangle is M*P, where M is the infinite bidiagonal matrix with (1,2,3,...) in the main diagonal and (1,1,1,...) in the subdiagonal and P is Pascal's triangle as an infinite lower triangular matrix. The triangle A124727 is P*M.

Examples

			First few rows of the triangle are
  1;
  3,  2;
  4,  7,  3;
  5, 14, 13,  4
  6, 23, 33, 21,  5;
  7, 34, 66, 64, 31,  6;
  ...
		

Crossrefs

Cf. A052951 (row sums).

Programs

  • Magma
    A123097:= func< n,k | n eq 1 select 1 else Binomial(n-2, k-1) + n*Binomial(n-1, k-1) >;
    [A123097(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Jul 21 2021
    
  • Maple
    T:=proc(n,k) if n=1 and k=1 then 1 elif n=1 then 0 else binomial(n-2,k-1)+n*binomial(n-1,k-1) fi end: for n from 1 to 12 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form
  • Mathematica
    T[n_, k_]= If[n==1, 1, Binomial[n-2, k-1] + n*Binomial[n-1, k-1]];
    Table[T[n, k], {n, 12}, {k, n}]//Flatten (* G. C. Greubel, Jul 21 2021 *)
  • PARI
    T(n,k) = if ((n==1), (k==1), binomial(n-2,k-1)+n*binomial(n-1,k-1));
    matrix(11, 11, n, k, T(n,k)) \\ Michel Marcus, Nov 09 2019
    
  • Sage
    def A123097(n,k): return 1 if (n==1) else binomial(n-2, k-1) + n*binomial(n-1, k-1)
    flatten([[A123097(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Jul 21 2021

Formula

Sum_{k=1..n} T(n, k) = 2^(n-2)*(2*n + 1) - (1/2)*[n=1] = A052951(n-1). - G. C. Greubel, Jul 21 2021

Extensions

Edited by N. J. A. Sloane, Nov 24 2006