login
A264970
If A262686(n) = 0, a(n) = 0, otherwise a(n) = 1 + a(A262686(n)), where A262686(n) = largest number k such that k - d(k) = n, or 0 if no such number exists, and d(n) = the number of divisors of n (A000005).
4
12, 2, 11, 2, 1, 1, 10, 0, 0, 3, 2, 2, 9, 0, 1, 5, 1, 4, 8, 0, 0, 3, 7, 2, 0, 0, 2, 1, 0, 1, 6, 6, 1, 0, 5, 5, 0, 0, 6, 4, 0, 1, 4, 0, 1, 3, 3, 2, 5, 0, 0, 1, 0, 2, 2, 0, 0, 1, 1, 4, 4, 3, 3, 0, 0, 2, 0, 0, 0, 1, 2, 3, 3, 2, 0, 0, 2, 1, 4, 0, 1, 1, 3, 3, 2, 0, 2, 2, 0, 4, 3, 1, 1, 3, 2, 5, 1, 4, 0, 2, 0
OFFSET
0,1
COMMENTS
a(n) = number of iterations of A262686 needed before zero is reached. In the context of tree (A263267) defined by edge-relation A049820(child) = parent, this is the number of hops we make before reaching one of the leaves (A045765), when we start from n and always select the largest child at each iteration.
LINKS
FORMULA
If A060990(n) = 0, a(n) = 0, otherwise a(n) = 1 + a(A262686(n)).
Other identities. For all n >= 0:
a(n) = A264971(n) - 1.
PROG
(Scheme, with memoization-macro definec)
(definec (A264970 n) (cond ((A262686 n) => (lambda (lad) (if (zero? lad) 0 (+ 1 (A264970 lad)))))))
CROSSREFS
Cf. A045765 (positions of zeros).
One less than A264971.
Sequence in context: A322521 A099136 A215416 * A287205 A183729 A238718
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 29 2015
STATUS
approved