OFFSET
1,4
MATHEMATICA
F[1] = 0; F[2] = 1; F[3] = 1; F[n__] := F[n] = (n - 1)*(F[n - 1] + F[n - 2] + F[n - 3]) a = Table[F[n], {n, 1, 25}]
RecurrenceTable[{a[1]==0, a[2]==a[3]==1, a[n]==(n-1)(a[n-1]+a[n-2]+a[n-3])}, a, {n, 20}] (* Harvey P. Dale, Oct 26 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Jun 14 2005
STATUS
approved