OFFSET
0,3
FORMULA
EXAMPLE
[0] 1;
[1] 1, 2;
[2] 2, 4, 5;
[3] 6, 12, 15, 16;
[4] 24, 48, 60, 64, 65;
[5] 120, 240, 300, 320, 325, 326;
[6] 720, 1440, 1800, 1920, 1950, 1956, 1957;
MAPLE
T := (n, k) -> add(n!/j!, j = 0..k):
seq(seq(T(n, k), k = 0..n), n = 0..9);
MATHEMATICA
Module[{n=1}, NestList[Append[n#, 1+Last[#]n++]&, {1}, 10]] (* or *)
Table[Sum[n!/j!, {j, 0, k}], {n, 0, 10}, {k, 0, n}] (* Paolo Xausa, Dec 07 2023 *)
PROG
(SageMath)
def T(n, k): return sum(falling_factorial(n, n - j) for j in range(k + 1))
for n in range(9): print([T(n, k) for k in range(n + 1)])
(Python)
from functools import cache
@cache
def a_row(n: int) -> list[int]:
if n == 0: return [1]
row = a_row(n - 1) + [0]
for k in range(n): row[k] *= n
row[n] = row[n - 1] + 1
return row
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Dec 06 2023
STATUS
approved