A345021 a(n) is the result of replacing 2's by 0's in the hereditary base-2 expansion of n.
0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1
Offset: 0
Examples
For n = 13: - 13 = 2^(2^2^0 + 2^0) + 2^2^2^0 + 2^0, - so a(13) = 0^(0^0^0 + 0^0) + 0^0^0^0 + 0^0 = 2.
Links
- Rémy Sigrist, Colored scatterplot of the ordinal transform of the first 2^14 terms
- Rémy Sigrist, Colored scatterplot of the ordinal transform of the first 2^17 terms
- Wikipedia, Hereditary base-n notation
Crossrefs
Cf. A342707.
Programs
-
PARI
a(n) = { my (v=0, e); while (n, n-=2^e=valuation(n, 2); v+=0^a(e)); v }
Formula
a(n) = A342707(n, 0).
Comments