|
|
A355300
|
|
a(0) = 0; for n >= 1, a(n) = a(A007088(n) mod n) + 1.
|
|
0
|
|
|
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 1, 2, 2, 3, 2, 2, 1, 3, 2, 4, 1, 1, 3, 3, 2, 2, 3, 4, 3, 4, 2, 4, 1, 3, 2, 2, 2, 2, 3, 3, 1, 3, 1, 2, 2, 5, 2, 3, 2, 6, 2, 2, 2, 2, 2, 2, 2, 4, 3, 2, 2, 2, 3, 2, 1, 4, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 4, 1, 3, 2, 4, 1, 3, 2, 4, 3, 3, 2, 2, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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.
|
|
LINKS
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|