%I #22 Jan 02 2023 12:30:51
%S 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 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 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 a(n) = Number of iterations of A257080 needed, starting from n, before a fixed point is reached.
%C 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 Antti Karttunen, <a href="/A257081/b257081.txt">Table of n, a(n) for n = 0..10080</a>
%H Eric Angelini, et al, <a href="http://list.seqfan.eu/oldermail/seqfan/2015-April/014728.html">"Multiply by the fantom digit", Discussion on Seqfan-list</a>
%F If A257079(n) = 1, a(n) = 0, otherwise, a(n) = 1 + a(A257080(n)).
%e 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 (Scheme)
%o (define (A257081 n) (let loop ((oldn n) (n (A257080 n)) (s 1)) (if (= oldn n) s (loop n (A257080 n) (+ 1 s)))))
%o ;; Alternative, recursive version, optionally using the memoizing definec-macro:
%o (definec (A257081 n) (if (= 1 (A257079 n)) 0 (+ 1 (A257081 (A257080 n)))))
%Y A255411 gives the positions of zeros.
%Y Cf. A007623, A257079, A257080.
%K nonn
%O 0,2
%A _Antti Karttunen_, Apr 15 2015