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).
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
Links
- A. Karttunen, Table of n, a(n) for n = 0..10080
Crossrefs
Programs
-
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 *)
Formula
a(0)=0; for n>0, a(n) = 1 + a(A219651(n)).
Extensions
Erroneous description corrected by Antti Karttunen, Dec 03 2012
Comments