login
Triangle T(n, k) = k*(n-1)! - k!, read by rows.
2

%I #21 Jan 05 2024 12:56:16

%S 0,0,0,1,2,0,5,10,12,0,23,46,66,72,0,119,238,354,456,480,0,719,1438,

%T 2154,2856,3480,3600,0,5039,10078,15114,20136,25080,29520,30240,0,

%U 40319,80638,120954,161256,201480,241200,277200,282240,0,362879,725758,1088634,1451496,1814280,2176560,2535120,2862720,2903040,0

%N Triangle T(n, k) = k*(n-1)! - k!, read by rows.

%H G. C. Greubel, <a href="/A137260/b137260.txt">Rows n = 1..50 of the triangle flattened</a>

%H Krassimir Penev, <a href="https://olympiadtraining.files.wordpress.com/2014/10/penev-the-fubini-principle.pdf">The Fubini Principle</a>, The American Mathematical Monthly, Vol. 115, No. 3 (Mar., 2008), pp. 245-248.

%F T(n, k) = k*(n-1)! - k!.

%F Sum_{k=1..n} T(n, k) = ((n+1)! - 2*!(n+1))/2 = (A000142(n+1) - 2*(A003422(n+1) -1))/2 = (A000142(n+1) - 2*(A007489(n) - 2))/2. - _G. C. Greubel_, Apr 10 2021

%e Triangle begins as:

%e 0;

%e 0, 0;

%e 1, 2, 0;

%e 5, 10, 12, 0;

%e 23, 46, 66, 72, 0;

%e 119, 238, 354, 456, 480, 0;

%e 719, 1438, 2154, 2856, 3480, 3600, 0;

%e 5039, 10078, 15114, 20136, 25080, 29520, 30240, 0;

%e 40319, 80638, 120954, 161256, 201480, 241200, 277200, 282240, 0;

%e 362879, 725758, 1088634, 1451496, 1814280, 2176560, 2535120, 2862720, 2903040, 0;

%p A137260:= (n,k) -> k*((n-1)! - (k-1)!); seq(seq(A137260(n,k), k=1..n), n=1..12); # _G. C. Greubel_, Apr 10 2021

%t T[n_, k_]:= k*(n-1)! - k!;

%t Table[T[n, k], {n,12}, {k, n}]//Flatten (* modified by _G. C. Greubel_, Apr 10 2021 *)

%o (Magma) [k*Factorial(n-1) - Factorial(k): k in [1..n], n in [1..12]]; // _G. C. Greubel_, Apr 10 2021

%o (Sage) flatten([[k*factorial(n-1) - factorial(k) for k in (1..n)] for n in (1..12)]) # _G. C. Greubel_, Apr 10 2021

%Y Cf. A000142, A007489.

%K nonn,tabl,easy

%O 1,5

%A _Roger L. Bagula_, Mar 11 2008

%E Edited by _G. C. Greubel_, Apr 10 2021