login
A373092
The number of iterations of the map x -> A093653(x) that are required to reach from n to one of the fixed points, 1, 2, 3 or 6.
3
0, 0, 0, 1, 1, 0, 2, 2, 2, 1, 2, 3, 2, 3, 3, 2, 1, 2, 2, 3, 3, 3, 2, 4, 1, 3, 3, 4, 2, 3, 1, 1, 3, 1, 3, 4, 2, 3, 2, 4, 2, 3, 2, 4, 4, 2, 1, 4, 3, 4, 3, 4, 2, 3, 3, 3, 2, 2, 1, 4, 1, 4, 2, 3, 3, 3, 2, 3, 2, 3, 2, 4, 2, 3, 3, 4, 3, 4, 1, 4, 4, 3, 2, 4, 3, 2, 4
OFFSET
1,7
LINKS
EXAMPLE
The iterations for the n = 1..7 are:
n a(n) iterations
- ---- -----------
1 0 1
2 0 2
3 0 3
4 1 4 -> 3
5 1 5 -> 3
6 0 6
7 2 7 -> 4 -> 3
MATHEMATICA
d[n_] := DivisorSum[n, Plus @@ IntegerDigits[#, 2] &]; a[n_] := -2 + Length@ FixedPointList[d, n]; Array[a, 100]
PROG
(PARI) a(n) = {my(c = 0); while(6 % n, n = sumdiv(n, d, hammingweight(d)); c++); c; }
CROSSREFS
Cf. A086793 (decimal analog), A093653, A373093, A373094.
Sequence in context: A006371 A000177 A319815 * A222656 A162545 A162544
KEYWORD
nonn,easy,base
AUTHOR
Amiram Eldar, May 23 2024
STATUS
approved