|
|
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).
|
|
3
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
The condition "with as many distinct values as possible" means here that for any distinct m and n, provided the orbits of m and n under the map x -> rev(x) do not merge, then a(m) <> a(n).
|
|
LINKS
|
|
|
FORMULA
|
a(2*n) = a(n).
a(n) = 1 iff n is a power of 2.
a(A340718(n)) = n (and this is the first occurrence of n in the sequence).
|
|
EXAMPLE
|
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
|
|
PROG
|
(PARI) See Links section.
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|