OFFSET
1,1
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..25000
EXAMPLE
66 written in binary is 1000010. This has five 0's and five is a prime. So 66 is included in the sequence.
MATHEMATICA
Select[Range@ 120, PrimeQ@ DigitCount[#, 2, 0] &] (* Michael De Vlieger, Oct 26 2017 *)
PROG
(PARI) isok(n) = isprime(#binary(n) - hammingweight(n)); \\ Michel Marcus, Feb 23 2016
(Python)
from sympy import isprime
i=j=1
while j<=250:
if isprime(bin(i)[2:].count("0")):
print(str(j)+" "+str(i))
j+=1
i+=1 # Indranil Ghosh, Feb 03 2017
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Sep 20 2008
EXTENSIONS
Many more terms from Reikku Kulon, Sep 21 2008
Name edited by Michel Marcus, Apr 30 2021
STATUS
approved