OFFSET
0,3
LINKS
FORMULA
For all n>= 1, a(A000142(n)) = n.
MATHEMATICA
f[n_] := If[n == 0, 0, Module[{s = 0, i = 2, k = n},
While[k>0, k = Floor[n/i!]; s += (i-1) k; i++]; n-s]];
b[_] = 1;
a[n_] := a[n] = With[{t = f[n]}, b[t]++];
a /@ Range[0, 100] (* Jean-François Alcover, Dec 19 2021 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, May 20 2017
STATUS
approved