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.
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
Examples
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
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
d[n_] := DivisorSum[n, Plus @@ IntegerDigits[#, 2] &]; a[n_] := -2 + Length@ FixedPointList[d, n]; Array[a, 100]
-
PARI
a(n) = {my(c = 0); while(6 % n, n = sumdiv(n, d, hammingweight(d)); c++); c;}
Comments