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 A226077 #8 May 26 2013 21:57:00 %S A226077 1,3,2,6,4,5,9,7,10,8,11,12,20,13,17,15,18,14,19,16,21,24,22,25,33,23, %T A226077 34,26,35,29,36,28,37,27,38,32,39,40,30,41,48,31,65,43,52,42,49,44,50, %U A226077 45,67,46,66,47,68,53,70,51,69,54,74,55,73,56,72,57,71,58,76,59,80,60,75,64,77,82,61,96,62,81,78,97,84,98,85,104,83,100,88 %N A226077 a(1)=1; a(n) = smallest positive integer not yet in the sequence, such that a(n) and a(n-1) have exactly one common 1-bit in their binary representations. %C A226077 A000120(a(n) & a(n+1))=1, where & stands for the bitwise AND operator. %C A226077 Permutation of the natural numbers with inverse A226093. - _Reinhard Zumkeller_, May 26 2013 %H A226077 Paul Tek, <a href="/A226077/b226077.txt">Table of n, a(n) for n = 1..10000</a> %H A226077 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %e A226077 a(1)=1 by definition. %e A226077 A000120(a(1) & 2)=0, A000120(a(1) & 3)=1, hence a(2)=3. %e A226077 A000120(a(2) & 2)=1, hence a(3)=2. %e A226077 A000120(a(3) & 4)=0, A000120(a(3) & 5)=0, A000120(a(3) & 6)=1, hence a(4)=6. %e A226077 A000120(a(4) & 4)=1, hence a(5)=4. %e A226077 A000120(a(5) & 5)=1, hence a(6)=5. %e A226077 A000120(a(6) & 7)=2, A000120(a(6) & 8)=0, A000120(a(6) & 9)=1, hence a(7)=9. %e A226077 A000120(a(7) & 7)=1, hence a(8)=7. %e A226077 A000120(a(8) & 8)=0, A000120(a(8) & 10)=1, hence a(9)=10. %e A226077 A000120(a(9) & 8)=1, hence a(10)=8. %o A226077 (Haskell) %o A226077 import Data.Bits ((.&.)) %o A226077 import Data.List (delete) %o A226077 a226077 n = a226077_list !! (n-1) %o A226077 a226077_list = 1 : f 1 [2..] where %o A226077 f :: Integer -> [Integer] -> [Integer] %o A226077 f x zs = g zs where %o A226077 g (y:ys) | a209229 (x .&. y) == 0 = g ys %o A226077 | otherwise = y : f y (delete y zs) %o A226077 -- _Reinhard Zumkeller_, May 26 2013 %Y A226077 Cf. A109812, A115510, A000120. %Y A226077 Cf. A209229. %K A226077 nonn,base %O A226077 1,2 %A A226077 _Paul Tek_, May 25 2013