This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A238757 #22 Jun 22 2022 07:34:45 %S A238757 2,1,4,3,8,9,16,5,6,17,20,18,32,33,48,7,10,12,36,11,34,40,64,35,38,37, %T A238757 68,65,66,96,128,13,14,21,24,19,26,25,72,22,70,69,80,67,82,81,144,15, %U A238757 74,73,76,75,130,129,136,71,132,133,192,131,194,193,256,23 %N A238757 Lexicographically earliest sequence of distinct positive integers such that for any n>0 we have (a(n) AND n) = 0 (where AND stands for the bitwise AND operator). %C A238757 This is a permutation of the positive integers. %C A238757 Apparently, a self-inverse permutation. %C A238757 There are no fixed points. %H A238757 Paul Tek, <a href="/A238757/b238757.txt">Table of n, a(n) for n = 1..10000</a> %H A238757 Paul Tek, <a href="/A238757/a238757.txt">Perl program for this sequence</a> %H A238757 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %o A238757 (Perl) See Link section. %o A238757 (Python) %o A238757 from itertools import count, islice %o A238757 def agen(): # generator of terms %o A238757 aset, mink = set(), 1 %o A238757 for n in count(1): %o A238757 an = mink %o A238757 while an in aset or n&an: an += 1 %o A238757 aset.add(an); yield an %o A238757 while mink in aset: mink += 1 %o A238757 print(list(islice(agen(), 64))) # _Michael S. Branicky_, Jun 22 2022 %Y A238757 Cf. A238758. %K A238757 nonn %O A238757 1,1 %A A238757 _Paul Tek_, Mar 05 2014