login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A219652
Number of steps to reach 0 starting with n and using the iterated process: x -> x - (sum of digits in factorial expansion of x).
15
0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19
OFFSET
0,3
COMMENTS
See A007623 for the factorial number system representation.
LINKS
FORMULA
a(0)=0; for n>0, a(n) = 1 + a(A219651(n)).
MATHEMATICA
nn = 72; m = 1; While[Factorial@ m < nn, m++]; m; Table[Length@ NestWhileList[# - Total@ IntegerDigits[#, MixedRadix[Reverse@ Range[2, m]]] &, n, # > 0 &] - 1, {n, 0, nn}] (* Michael De Vlieger, Jun 27 2016, Version 10.2 *)
PROG
(Scheme with memoization macro definec): (definec (A219652 n) (if (zero? n) n (+ 1 (A219652 (A219651 n)))))
CROSSREFS
Analogous sequence for binary system: A071542, for Zeckendorf expansion: A219642. Cf. A007623, A034968, A219650, A219651, A219653-A219655, A219659, A219661, A219666.
Sequence in context: A303594 A085089 A228720 * A069924 A377028 A225559
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Nov 25 2012
EXTENSIONS
Erroneous description corrected by Antti Karttunen, Dec 03 2012
STATUS
approved