OFFSET
1,7
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn,easy,base
AUTHOR
Amiram Eldar, May 23 2024
STATUS
approved