OFFSET
1,3
LINKS
G. C. Greubel, Rows n = 1..50 of the triangle, flattened
FORMULA
From G. C. Greubel, Mar 13 2023: (Start)
T(n, k) = T(n,k-1) + k*k!, with T(n, 1) = 1.
EXAMPLE
Triangle begins as:
1;
1, 5;
1, 5, 23;
1, 5, 23, 119;
1, 5, 23, 119, 719;
1, 5, 23, 119, 719, 5039;
1, 5, 23, 119, 719, 5039, 40319;
MATHEMATICA
a[n_]:= a[n]= If[n==1, 1, a[n-1] + k!*n];
Table[a[k], {n, 12}, {k, n}]//Flatten
PROG
(Magma)
function T(n, k)
if k eq 1 then return 1;
else return T(n, k-1) + k*Factorial(k);
end if;
end function;
[T(n, k): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 13 2023
(SageMath)
@CachedFunction
def T(n, k):
if (k==1): return 1
else: return T(n, k-1) + k*factorial(k)
flatten([[T(n, k) for k in range(1, n+1)] for n in range(1, 10)]) # G. C. Greubel, Mar 13 2023
CROSSREFS
KEYWORD
AUTHOR
Roger L. Bagula, Apr 05 2005
STATUS
approved