A329101 Lexicographically earliest sequence of distinct nonnegative integers such that for any n >= 0, the number of 1's in the base 4 expansion of n equals the number of 2's in the base 4 expansion of a(n).
0, 2, 1, 3, 6, 10, 8, 9, 4, 11, 5, 7, 12, 14, 13, 15, 18, 26, 22, 24, 34, 42, 38, 40, 25, 41, 27, 30, 32, 43, 33, 35, 16, 36, 17, 19, 37, 46, 39, 44, 20, 45, 21, 23, 28, 47, 29, 31, 48, 50, 49, 51, 54, 58, 56, 57, 52, 59, 53, 55, 60, 62, 61, 63, 66, 74, 70, 72
Offset: 0
Examples
The first terms, alongside the base 4 representations of n and of a(n), are: n a(n) qua(n) qua(a(n)) -- ---- ------ --------- 0 0 0 0 1 2 1 2 2 1 2 1 3 3 3 3 4 6 10 12 5 10 11 22 6 8 12 20 7 9 13 21 8 4 20 10 9 11 21 23 10 5 22 11 11 7 23 13 12 12 30 30 13 14 31 32 14 13 32 31 15 15 33 33
Links
- Rémy Sigrist, Table of n, a(n) for n = 0..4095
- Rémy Sigrist, PARI program for A329101
- Rémy Sigrist, Scatterplot of the sequence for n = 0..4^3-1
- Rémy Sigrist, Scatterplot of the sequence for n = 0..4^10-1
- Rémy Sigrist, Colored scatterplot of the sequence for n = 0..4^10-1 (where the color is function of A160381(n))
- Index entries for sequences that are permutations of the natural numbers
Programs
-
PARI
See Links section.
Comments