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 A366027 #6 Oct 02 2023 13:49:00 %S A366027 1,2,4,3,16,5,64,8,256,17,1024,6,4096,65,20,9,65536,7,262144,10,68, %T A366027 1025,4194304,11,16777216,4097,257,66,268435456,18,1073741824,128, %U A366027 1028,65537,80,12,68719476736,262145,4100,19,1099511627776,32,4398046511104,1026,21 %N A366027 Lexicographically earliest sequence of distinct positive integers such that for any n > 0, if 2^(d-1) appears in the binary expansion of a(n) then d divides n. %C A366027 In other words, the binary expansion of a(n) encodes a subset of the divisors of n. %C A366027 This sequence is a permutation of the positive integers with inverse A366028. %H A366027 Rémy Sigrist, <a href="/A366027/a366027.gp.txt">PARI program</a> %H A366027 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A366027 a(p) = 2^(p-1) for any prime number p. %F A366027 a(2*p) = 2^(p-1) + 1 for any prime number p. %e A366027 The first terms, alongside their binary expansion and the corresponding divisors d, are: %e A366027 n a(n) bin(a(n)) Corresponding divisors %e A366027 -- ------ ------------------- ---------------------- %e A366027 1 1 1 {1} %e A366027 2 2 10 {2} %e A366027 3 4 100 {3} %e A366027 4 3 11 {2, 1} %e A366027 5 16 10000 {5} %e A366027 6 5 101 {3, 1} %e A366027 7 64 1000000 {7} %e A366027 8 8 1000 {4} %e A366027 9 256 100000000 {9} %e A366027 10 17 10001 {5, 1} %e A366027 11 1024 10000000000 {11} %e A366027 12 6 110 {3, 2} %e A366027 13 4096 1000000000000 {13} %e A366027 14 65 1000001 {7, 1} %e A366027 15 20 10100 {5, 3} %e A366027 16 9 1001 {4, 1} %e A366027 17 65536 10000000000000000 {17} %e A366027 18 7 111 {3, 2, 1} %o A366027 (PARI) See Links section. %Y A366027 Cf. A048793, A271410, A366028 (inverse). %K A366027 nonn,base %O A366027 1,2 %A A366027 _Rémy Sigrist_, Sep 26 2023