Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #21 Sep 08 2022 08:45:28
%S 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,
%T 43,7,9,62,183,300,295,174,57,8,10,79,273,539,665,525,259,73,9,11,98,
%U 388,896,1330,1316,868,368,91,10,12,119,531,1404,2436,2898,2394,1356,504,111,11
%N 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.
%C 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.
%H G. C. Greubel, <a href="/A123097/b123097.txt">Rows n = 1..50 of the triangle, flattened</a>
%F 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
%e First few rows of the triangle are
%e 1;
%e 3, 2;
%e 4, 7, 3;
%e 5, 14, 13, 4
%e 6, 23, 33, 21, 5;
%e 7, 34, 66, 64, 31, 6;
%e ...
%p 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
%t T[n_, k_]= If[n==1, 1, Binomial[n-2, k-1] + n*Binomial[n-1, k-1]];
%t Table[T[n, k], {n, 12}, {k, n}]//Flatten (* _G. C. Greubel_, Jul 21 2021 *)
%o (PARI) T(n,k) = if ((n==1), (k==1), binomial(n-2,k-1)+n*binomial(n-1,k-1));
%o matrix(11, 11, n, k, T(n,k)) \\ _Michel Marcus_, Nov 09 2019
%o (Magma)
%o A123097:= func< n,k | n eq 1 select 1 else Binomial(n-2, k-1) + n*Binomial(n-1, k-1) >;
%o [A123097(n,k): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Jul 21 2021
%o (Sage)
%o def A123097(n,k): return 1 if (n==1) else binomial(n-2, k-1) + n*binomial(n-1, k-1)
%o flatten([[A123097(n,k) for k in (1..n)] for n in (1..12)]) # _G. C. Greubel_, Jul 21 2021
%Y Cf. A052951 (row sums).
%K nonn,tabl
%O 1,2
%A _Gary W. Adamson_ and _Roger L. Bagula_, Nov 05 2006
%E Edited by _N. J. A. Sloane_, Nov 24 2006