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 A372685 #23 May 13 2024 11:18:50 %S A372685 2,3,7,23,31,127,311,383,991,2039,3583,6143,8191,63487,73727,129023, %T A372685 131071,522239,524287,1966079,4128767,14680063,16250879,33546239, %U A372685 67108351,201064447,260046847,536739839,1073479679,2147483647,5335154687,8581545983,16911433727 %N A372685 Prime numbers such that no lesser prime has the same binary weight (number of ones in binary expansion). %C A372685 The unsorted version is A061712. %H A372685 Michael S. Branicky, <a href="/A372685/b372685.txt">Table of n, a(n) for n = 1..3320</a> (terms 36..3320 using A061712) %F A372685 a(n) = prime(A372686(n)). %e A372685 The terms together with their binary expansions and binary indices begin: %e A372685 2: 10 ~ {2} %e A372685 3: 11 ~ {1,2} %e A372685 7: 111 ~ {1,2,3} %e A372685 23: 10111 ~ {1,2,3,5} %e A372685 31: 11111 ~ {1,2,3,4,5} %e A372685 127: 1111111 ~ {1,2,3,4,5,6,7} %e A372685 311: 100110111 ~ {1,2,3,5,6,9} %e A372685 383: 101111111 ~ {1,2,3,4,5,6,7,9} %e A372685 991: 1111011111 ~ {1,2,3,4,5,7,8,9,10} %e A372685 2039: 11111110111 ~ {1,2,3,5,6,7,8,9,10,11} %e A372685 3583: 110111111111 ~ {1,2,3,4,5,6,7,8,9,11,12} %e A372685 6143: 1011111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,13} %t A372685 First/@GatherBy[Select[Range[1000],PrimeQ],DigitCount[#,2,1]&] %o A372685 (Python) %o A372685 from itertools import islice %o A372685 from sympy import nextprime %o A372685 def A372685_gen(): # generator of terms %o A372685 p, a = 1, {} %o A372685 while (p:=nextprime(p)): %o A372685 if (c:=p.bit_count()) not in a: %o A372685 yield p %o A372685 a[c] = p %o A372685 A372685_list = list(islice(A372685_gen(),20)) # _Chai Wah Wu_, May 12 2024 %Y A372685 This statistic (binary weight of primes) is A014499. %Y A372685 Sorted version of A061712. %Y A372685 For binary length instead of weight we have A104080, firsts of A035100. %Y A372685 These primes have indices A372686, sorted version of A372517. %Y A372685 A000120 counts ones in binary expansion (binary weight), zeros A080791. %Y A372685 A029837 gives greatest binary index, least A001511. %Y A372685 A030190 gives binary expansion, reversed A030308. %Y A372685 A035103 counts zeros in binary expansion of primes, firsts A372474. %Y A372685 A048793 lists binary indices, reverse A272020, sum A029931. %Y A372685 A372471 lists binary indices of primes. %Y A372685 Cf. A000040, A005940, A066195, A069010, A070939, A071814, A211997, A372429, A372516, A372684. %K A372685 nonn,base %O A372685 1,1 %A A372685 _Gus Wiseman_, May 10 2024 %E A372685 a(22)-a(33) from _Chai Wah Wu_, May 12 2024