login
A262905
a(n) = number of steps needed to reach zero when starting with k = n, and repeatedly replacing k with A262904(k).
3
0, 1, 2, 1, 1, 1, 3, 1, 1, 3, 3, 3, 2, 3, 3, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 2, 2, 3, 2, 3, 4, 3, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 2, 3, 2, 3, 4, 3, 2, 4, 2, 3, 4, 3, 4, 3, 2, 3, 4, 3, 2, 3, 3, 3, 3, 3, 4, 3, 3, 3, 4, 3, 2, 3, 4, 3, 4, 3, 4, 3, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 2, 4, 3, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 4
OFFSET
0,3
LINKS
FORMULA
a(0) = 0; and for n >= 1, a(n) = 1 + a(A262904(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A262905 n) (if (zero? n) n (+ 1 (A262905 (A262904 n)))))
CROSSREFS
Sequence in context: A289356 A269977 A238710 * A330794 A102054 A111604
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 07 2015
STATUS
approved