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 A331274 #22 Mar 19 2025 05:54:37 %S A331274 1,2,3,4,6,5,7,8,12,10,14,9,13,11,15,16,24,20,28,18,26,25,30,17,22,21, %T A331274 29,19,27,23,31,32,48,40,56,36,52,50,60,34,49,44,58,42,57,54,62,33,41, %U A331274 38,53,37,51,46,61,35,45,43,59,39,55,47,63,64,96,80,112 %N A331274 a(n) is the greatest binary anagram of n not yet in the sequence. %C A331274 Leading zeros are ignored. %C A331274 This sequence is a self-inverse permutation of the natural numbers. %H A331274 Rémy Sigrist, <a href="/A331274/b331274.txt">Table of n, a(n) for n = 1..8192</a> %H A331274 Rémy Sigrist, <a href="/A331274/a331274.png">Colored scatterplot of the first 2^13 terms</a> (where the color is function of the Hamming weight of n) %H A331274 Rémy Sigrist, <a href="/A331274/a331274.gp.txt">PARI program for A331274</a> %H A331274 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A331274 a(A187769(n, k)) = A187769(n, A007318(n-1)+1-k) for any n > 0 and k = 1..A007318(n-1). %e A331274 The first terms, in decimal and in binary, are: %e A331274 n a(n) bin(n) bin(a(n)) %e A331274 -- ---- ------ --------- %e A331274 1 1 1 1 %e A331274 2 2 10 10 %e A331274 3 3 11 11 %e A331274 4 4 100 100 %e A331274 5 6 101 110 %e A331274 6 5 110 101 %e A331274 7 7 111 111 %e A331274 8 8 1000 1000 %e A331274 9 12 1001 1100 %e A331274 10 10 1010 1010 %e A331274 11 14 1011 1110 %e A331274 12 9 1100 1001 %e A331274 13 13 1101 1101 %e A331274 14 11 1110 1011 %e A331274 15 15 1111 1111 %o A331274 (PARI) \\ See Links section. %Y A331274 Cf. A007318, A187769, A298847, A331275 (ternary analog). %K A331274 nonn,look,base %O A331274 1,2 %A A331274 _Rémy Sigrist_, Jan 13 2020