OFFSET
0,4
COMMENTS
Number of steps needed to reach zero when starting from k = n and repeatedly applying the map that replaces k by A007088(k) mod k. For a(n) = 1 see A032533.
a(95980631) = 26. - Charles R Greathouse IV, Jun 30 2022
EXAMPLE
n = 12, a(12) = a(1100 mod 12) + 1 = a(8) + 1 = a(1000 mod 8) + 2 = a(0) + 2 = 2.
MATHEMATICA
a[n_] := a[n] = a[Mod[FromDigits[IntegerDigits[n, 2]], n]] + 1; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Jun 27 2022 *)
PROG
(PARI) f(n) = fromdigits(binary(n), 10); \\ A007088
a(n) = if (n, a(f(n) % n)+1, 0); \\ Michel Marcus, Jun 27 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Jun 27 2022
STATUS
approved