|
|
A257081
|
|
a(n) = Number of iterations of A257080 needed, starting from n, before a fixed point is reached.
|
|
3
|
|
|
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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
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.
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
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.
|
|
PROG
|
(Scheme)
(define (A257081 n) (let loop ((oldn n) (n (A257080 n)) (s 1)) (if (= oldn n) s (loop n (A257080 n) (+ 1 s)))))
;; Alternative, recursive version, optionally using the memoizing definec-macro:
|
|
CROSSREFS
|
A255411 gives the positions of zeros.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|