OFFSET
0,3
LINKS
G. C. Greubel, Rows n = 0..50 of the triangle, flattened
FORMULA
From G. C. Greubel, Mar 12 2023: (Start)
T(n, k) = T(n, k-1) + (k+1)*n!, T(n, 0) = 1.
T(n, n-1) = (1/2)*((n^2 + n - 2)*n! + 2).
T(n, n) = (1/2)*(n*(n+3)*n! + 2). (End)
EXAMPLE
Triangle begins:
1;
1, 3;
1, 5, 11;
1, 13, 31, 55;
1, 49, 121, 217, 337;
1, 241, 601, 1081, 1681, 2401;
...
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==0, 1, T[n, k-1] +(k+1)*n!];
Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten
PROG
(Magma)
function T(n, k) // T = A105064
if k eq 0 then return 1;
else return T(n, k-1) + (k+1)*Factorial(n);
end if; return T;
end function;
[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 12 2023
(SageMath)
def T(n, k): # T = A105064
if (k==0): return 1
else: return T(n, k-1) + (k+1)*factorial(n)
flatten([[T(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Mar 12 2023
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Apr 05 2005
EXTENSIONS
Edited by G. C. Greubel, Mar 12 2023
STATUS
approved