A340717 Lexicographically earliest sequence of nonnegative integers with as many distinct values as possible such that for any n >= 0, a(rev(n)) = a(n) (where rev(n) = A030101(n) corresponds to the binary reversal of n).
0, 1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 6, 4, 7, 1, 8, 5, 9, 3, 10, 6, 11, 2, 9, 6, 12, 4, 11, 7, 13, 1, 14, 8, 15, 5, 16, 9, 17, 3, 16, 10, 18, 6, 19, 11, 20, 2, 15, 9, 21, 6, 18, 12, 22, 4, 17, 11, 22, 7, 20, 13, 23, 1, 24, 14, 25, 8, 26, 15, 27, 5, 28, 16
Offset: 0
Examples
The first terms, alongside rev(n), are: n a(n) rev(n) -- ---- ------ 0 0 0 1 1 1 2 1 1 3 2 3 4 1 1 5 3 5 6 2 3 7 4 7 8 1 1 9 5 9 10 3 5 11 6 13 12 2 3 13 6 11 14 4 7 15 7 15
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..8191
- Rémy Sigrist, Colored scatterplot of the first 2^16 terms (where the color is function of A007814(n), the 2-adic valuation of n)
- Rémy Sigrist, PARI program for A340717
Crossrefs
Programs
-
PARI
See Links section.
Comments