A326732 Number of iterations of A326731(x) starting at x = n to reach 0.
0, 1, 1, 2, 1, 4, 2, 3, 1, 6, 4, 7, 2, 5, 3, 4, 1, 8, 6, 11, 4, 9, 7, 10, 2, 7, 5, 8, 3, 6, 4, 5, 1, 10, 8, 15, 6, 13, 11, 16, 4, 11, 9, 14, 7, 12, 10, 13, 2, 9, 7, 12, 5, 10, 8, 11, 3, 8, 6, 9, 4, 7, 5, 6, 1, 12, 10, 19, 8, 17, 15, 22, 6, 15, 13, 20, 11, 18, 16, 21, 4, 13, 11, 18, 9, 16, 14, 19, 7, 14, 12, 17, 10, 15, 13, 16, 2, 11, 9, 16, 7
Offset: 0
Links
- International Mathematical Olympiad, Problem 5 of IMO 2019.
- Rémy Sigrist, Scatterplot of the ordinal transform of the first 2^16 terms
Programs
-
PARI
A326732(n) = my(b=binary(n)); 2*sum(i=1, #b, i*b[i]) - vecsum(b)^2;
Comments