

A262155


Lexicographically earliest sequence of distinct positive integers such that for any n>0, n and a(n) have no common 1bit in their binary representations, and no two successive terms have a common 1bit 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 combines the constraints met in A109812 and in A238757.
This sequence is a permutation of the positive integers, with inverse A262230.


LINKS

Paul Tek, Table of n, a(n) for n = 1..100000
Paul Tek, PERL program for this sequence
Index entries for sequences that are permutations of the natural numbers


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(51)=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

Cf. A109812, A238757, A262230.
Sequence in context: A114438 A238757 A262230 * A181882 A109195 A258310
Adjacent sequences: A262152 A262153 A262154 * A262156 A262157 A262158


KEYWORD

nonn,base


AUTHOR

Paul Tek, Sep 13 2015


STATUS

approved



