This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A219652 #18 Jun 29 2016 00:20:44 %S A219652 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, %T A219652 11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,14,14,15,15,15,15,16,16, %U A219652 16,16,17,17,17,17,18,18,18,18,18,18,19,19,19,19,19,19 %N 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). %C A219652 See A007623 for the factorial number system representation. %H A219652 A. Karttunen, <a href="/A219652/b219652.txt">Table of n, a(n) for n = 0..10080</a> %F A219652 a(0)=0; for n>0, a(n) = 1 + a(A219651(n)). %t A219652 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 *) %o A219652 (Scheme with memoization macro definec): (definec (A219652 n) (if (zero? n) n (+ 1 (A219652 (A219651 n))))) %Y A219652 Analogous sequence for binary system: A071542, for Zeckendorf expansion: A219642. Cf. A007623, A034968, A219650, A219651, A219653-A219655, A219659, A219661, A219666. %K A219652 nonn,base %O A219652 0,3 %A A219652 _Antti Karttunen_, Nov 25 2012 %E A219652 Erroneous description corrected by _Antti Karttunen_, Dec 03 2012