OFFSET
1,2
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.
LINKS
G. C. Greubel, Rows n = 1..50 of the triangle, flattened
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
EXAMPLE
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;
...
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 *)
PROG
(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
(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
(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
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson and Roger L. Bagula, Nov 05 2006
EXTENSIONS
Edited by N. J. A. Sloane, Nov 24 2006
STATUS
approved