login
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.
1
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,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.
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
Cf. A052951 (row sums).
Sequence in context: A368254 A368261 A368263 * A368218 A352419 A209706
KEYWORD
nonn,tabl
AUTHOR
EXTENSIONS
Edited by N. J. A. Sloane, Nov 24 2006
STATUS
approved