OFFSET
0,5
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..4319
FORMULA
MATHEMATICA
f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], (# #!) &[# - i]]], {i, 0, # - 1}] &@ NestWhile[# + 1 &, 0, (# #!) &[# + 1] <= n &]; Rest[a][[All, 1]]]; {0}~Join~Table[# #! &[Length@ TakeWhile[Reverse@ f@ n, # == 0 &] + 1], {n, 120}] (* Michael De Vlieger, Aug 31 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 30 2016
STATUS
approved