|
|
A262155
|
|
Lexicographically earliest sequence of distinct positive integers such that for any n>0, n and a(n) have no common 1-bit in their binary representations, and no two successive terms have a common 1-bit in their binary representations.
|
|
2
|
|
|
2, 1, 4, 3, 8, 16, 32, 5, 18, 33, 20, 34, 64, 17, 96, 6, 40, 65, 12, 35, 72, 128, 104, 7, 160, 68, 256, 66, 288, 129, 320, 9, 22, 73, 132, 10, 80, 136, 272, 67, 144, 69, 384, 19, 192, 257, 208, 11, 196, 264, 512, 74, 640, 265, 576, 130, 260, 193, 516, 131, 768
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
This sequence is a permutation of the positive integers, with inverse A262230.
|
|
LINKS
|
|
|
EXAMPLE
|
For n=5:
- the values 2, 1, 4 and 3 have already been used;
- we have the following candidates:
+---+--------+-------------+---------------+
| z | Binary | Common bits | Common bits |
| | digits | with 5 | with a(5-1)=3 |
+---+--------+-------------+---------------+
| 5 | 101 | 101 | 1 |
| 6 | 110 | 100 | 10 |
| 7 | 111 | 101 | 11 |
| 8 | 1000 | 0 | 0 |
|...| ... | ... | ... |
+---+--------+-------------+---------------+
Hence, a(5)=8.
|
|
PROG
|
(Perl) See Links section.
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|