OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..80
FORMULA
a(n) = Sum_{j=1..n-1} A142458(n-1, k)*a(n-k), with a(1) = 1.
MATHEMATICA
T[n_, k_, m_]:= T[n, k, m]= If[k==1 || k==n, 1, (m*n-m*k+1)*T[n-1, k-1, m] + (m*k-m+1)*T[n-1, k, m]];
a[n_]:= a[n]= If[n==1, 1, Sum[A142458[n-1, j]*a[n-j], {j, n-1}]];
Table[a[n], {n, 30}] (* modified by G. C. Greubel, Mar 16 2022 *)
PROG
(Sage)
@CachedFunction
def T(n, k, m):
if (k==1 or k==n): return 1
else: return (m*(n-k)+1)*T(n-1, k-1, m) + (m*k-m+1)*T(n-1, k, m)
def A142458(n, k): return T(n, k, 3)
@CachedFunction
[A154596(n) for n in (1..30)] # G. C. Greubel, Mar 16 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula and Gary W. Adamson, Jan 12 2009
EXTENSIONS
Offset changed by G. C. Greubel, Mar 16 2022
STATUS
approved