OFFSET
1,1
COMMENTS
The unsorted version is A061712.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..3320 (terms 36..3320 using A061712)
FORMULA
a(n) = prime(A372686(n)).
EXAMPLE
The terms together with their binary expansions and binary indices begin:
2: 10 ~ {2}
3: 11 ~ {1,2}
7: 111 ~ {1,2,3}
23: 10111 ~ {1,2,3,5}
31: 11111 ~ {1,2,3,4,5}
127: 1111111 ~ {1,2,3,4,5,6,7}
311: 100110111 ~ {1,2,3,5,6,9}
383: 101111111 ~ {1,2,3,4,5,6,7,9}
991: 1111011111 ~ {1,2,3,4,5,7,8,9,10}
2039: 11111110111 ~ {1,2,3,5,6,7,8,9,10,11}
3583: 110111111111 ~ {1,2,3,4,5,6,7,8,9,11,12}
6143: 1011111111111 ~ {1,2,3,4,5,6,7,8,9,10,11,13}
MATHEMATICA
First/@GatherBy[Select[Range[1000], PrimeQ], DigitCount[#, 2, 1]&]
PROG
(Python)
from itertools import islice
from sympy import nextprime
def A372685_gen(): # generator of terms
p, a = 1, {}
while (p:=nextprime(p)):
if (c:=p.bit_count()) not in a:
yield p
a[c] = p
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Gus Wiseman, May 10 2024
EXTENSIONS
a(22)-a(33) from Chai Wah Wu, May 12 2024
STATUS
approved