OFFSET
1,3
LINKS
FORMULA
a(n) = n - A227153(n).
EXAMPLE
22 has factorial expansion A007623(22) = "320", and multiplying the nonzero digits, we get 3*2 = 6, and 22-6 = 16, thus a(22)=16.
MATHEMATICA
a[n_] := Module[{k = n, m = 2, r, p = 1}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, If[r > 0, p *= r]; m++]; n - p]; Array[a, 100] (* Amiram Eldar, Feb 14 2024 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jul 04 2013
STATUS
approved