OFFSET
1,1
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..189
EXAMPLE
8287 is in the sequence because it is a prime and its binary expansion 10000001011111 contains exactly 7 zeros and 7 ones.
9161 is in the sequence because it is a prime and its binary expansion 10001111001001 contains exactly 7 zeros and 7 ones.
MAPLE
select(t -> isprime(t) and convert(convert(t, base, 2), `+`)=7, [seq(i, i=2^13+1..2^14-1, 2)]); # Robert Israel, Jan 09 2017
MATHEMATICA
Select[Prime[Range[50000]], Count[IntegerDigits[#, 2], 0] == Count[IntegerDigits[#, 2], 1] == 7 &]
Select[FromDigits[#, 2]&/@(Join[{1}, #]&/@Permutations[ {1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}]), PrimeQ]//Union (* Harvey P. Dale, May 10 2019 *)
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
K. D. Bajpai, Jan 09 2017
STATUS
approved