OFFSET
0,4
COMMENTS
Number of steps needed to reach zero when starting from k = n and repeatedly applying the map that replaces k with k - gcd(k,d(k)), where d(k) is the number of divisors of k (A000005).
Empirically: n/log(n) <= a(n) <= n/log(n) + 2*log(n).
EXAMPLE
a(6) = 1 + a(6-gcd(6,4)) = 1 + a(4) = 2 + a(4-gcd(4,3)) = 2 + a(3) = 3 + a(3-gcd(3,2)) = 3 + a(2) = 4 + a(2-gcd(2,2)) = 4 + a(0) = 4.
PROG
(PARI) a(n) = if (n==0, 0, 1 + a(n - gcd(n, numdiv(n)))); \\ Michel Marcus, Sep 25 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Sep 23 2019
STATUS
approved