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 A257081 #23 Dec 23 2024 14:53:44 %S A257081 0,2,1,2,0,3,1,3,1,1,2,2,0,4,2,2,0,3,0,2,3,2,0,3,1,3,1,3,1,2,1,4,1,1, %T A257081 7,3,1,6,1,3,2,5,1,4,1,1,2,3,0,4,2,2,0,4,2,2,9,10,4,8,0,6,3,3,0,6,0,3, %U A257081 6,3,0,6,0,2,2,2,0,3,2,2,2,2,1,3,0,1,3,1,0,2,0,2,2,3,0,4,0,3,8,4,0,5,6,5,3,2,6,4,0,3,1,5,0,5,0,2,2,2,0,6,1 %N A257081 a(n) = Number of iterations of A257080 needed, starting from n, before a fixed point is reached. %C A257081 Note: when at some point of iteration we reach some k whose factorial representation (A007623) does not contain any 1's, then at next step A257080(k) = 1*k, and thus a fixed point has been reached. %H A257081 Antti Karttunen, <a href="/A257081/b257081.txt">Table of n, a(n) for n = 0..10080</a> %H A257081 Eric Angelini, et al, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2015-April/014728.html">"Multiply by the fantom digit", Discussion on Seqfan-list</a> %F A257081 If A257079(n) = 1, a(n) = 0, otherwise, a(n) = 1 + a(A257080(n)). %e A257081 For n = 5, with factorial representation A007623(5) = "21", the least missing nonzero digit is 3, thus A257080(5) = 3*5 = 15. 15 has factorial representation "211", so again we multiply by 3, resulting 3*15 = 45, with factorial representation "1311", thus the least missing nonzero digit is now 2, and 2*45 = 90, "3300" in factorial base, for which the least missing digit is 1, resulting 1*90 = 90 forever after, thus we have reached a fixed point after three iteration steps (5 -> 15 -> 45 -> 90) and a(5) = 3. %o A257081 (Scheme) %o A257081 (define (A257081 n) (let loop ((oldn n) (n (A257080 n)) (s 1)) (if (= oldn n) s (loop n (A257080 n) (+ 1 s))))) %o A257081 ;; Alternative, recursive version, optionally using the memoizing definec-macro: %o A257081 (definec (A257081 n) (if (= 1 (A257079 n)) 0 (+ 1 (A257081 (A257080 n))))) %Y A257081 A255411 gives the positions of zeros. %Y A257081 Cf. A007623, A257079, A257080. %K A257081 nonn %O A257081 0,2 %A A257081 _Antti Karttunen_, Apr 15 2015