A143122 Triangle read by rows, T(n,k) = Sum_{j=k..n} j!, 0 <= k <= n.
1, 2, 1, 4, 3, 2, 10, 9, 8, 6, 34, 33, 32, 30, 24, 154, 153, 152, 150, 144, 120, 874, 873, 872, 870, 864, 840, 720, 5914, 5913, 5912, 5910, 5904, 5880, 5760, 5040, 46234, 46233, 46232, 46230, 46224, 46200, 46080, 45360, 40320
Offset: 0
Examples
First few rows of the triangle are: 1; 2, 1; 4, 3, 2; 10, 9, 8, 6; 34, 33, 32, 30, 24; ... T(4,2) = 32 = 4! + 3! + 2! = (24 + 6 + 2).
Links
- G. C. Greubel, Rows n = 0..100 of triangle, flattened
Programs
-
GAP
Flat(List([0..8],n->List([0..n],k->Sum([k..n],j->Factorial(j))))); # Muniru A Asiru, Oct 16 2018
-
Magma
[[(&+[Factorial(j): j in [k..n]]): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Oct 15 2018
-
Maple
a:=proc(n,k) local j; add(factorial(j),j=k..n) end: seq(seq(a(n,k),k=0..n),n=0..8); # Muniru A Asiru, Oct 16 2018
-
Mathematica
Table[Sum[j!, {j, k, n}], {n, 0, 15}, {k, 0, n}]//Flatten (* G. C. Greubel, Oct 15 2018 *)
-
PARI
for(n=0,15, for(k=0,n, print1(sum(j=k,n, j!), ", "))) \\ G. C. Greubel, Oct 15 2018
-
PARI
(A143122(n,k)=sum(j=k,n, j!)); T(n)=matrix(n++,n,i,j,i>=j)*matrix(n,n,i,j,(i>=j)*i--!) \\ M. F. Hasler, Aug 26 2020
Formula
Triangle read by rows, T(n,k) = Sum_{j=k..n} j!, 0 <= k <= n.
(The above is to be read as matrix product A*D*A where A is lower triangular filled with 1's and D = diag(n!, n >= 0). - M. F. Hasler, Aug 26 2020)
T(n, k) = t(k) - t(n + 1), where t(n) = (-1)^(n + 1)*Gamma(n + 1)*Subfactorial(-(n + 1)). - Peter Luschny, Jul 11 2024
Comments