This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A066149 Primes with an odd number of 0's in binary expansion. 5
 2, 5, 11, 13, 17, 23, 29, 37, 41, 47, 59, 61, 71, 83, 89, 101, 113, 131, 137, 151, 157, 167, 173, 179, 181, 191, 193, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 277, 281, 293, 311, 317, 337, 347, 349, 353, 359, 373, 383, 389, 401, 449, 461 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Indranil Ghosh, Table of n, a(n) for n = 1..20000 (terms 1..1000 from T. D. Noe) EXAMPLE 17 is in the sequence because 17 is a prime and 17 = 10001_2. '10001' has three 0's. - Indranil Ghosh, Feb 06 2017 MATHEMATICA Select[ Prime[ Range[ PrimePi[ 1000 ] ] ], OddQ[ Count[ IntegerDigits[ #, 2 ], 0 ] ]& ] PROG (PARI) a066149(m) = local(p, v, z); forprime(p=2, m, v=binary(p); z=0; for(j=1, matsize(v)[2], if(v[j]==0, z++)); if(z%2==1, print1(p, ", "))) a066149(500) (PARI) f(p)=v=binary(p); s=0; for(k=1, #v, if(v[k]==0, s++)); return(s%2) forprime(p=2, 461, if(f(p), print1(p, ", "))) \\ Washington Bomfim, Jan 14 2011 (PARI) forprime(p=2, 10^3, if( #select(x->x==0, digits(p, 2))%2==1, print1(p, ", "))); \\ Joerg Arndt, Jun 16 2018 (Python) import isprime i=j=1 while i<=20000: ....if isprime(i)==True and bin(i)[2:].count("0")%2==1: ........print str(j)+" "+str(i) ........j+=1 ....i+=1 # Indranil Ghosh, Feb 06 2017 CROSSREFS Cf. A066148, A027699, A027697. Cf. A059009. Sequence in context: A218582 A118753 A305033 * A215423 A019387 A019337 Adjacent sequences:  A066146 A066147 A066148 * A066150 A066151 A066152 KEYWORD nonn,easy,base AUTHOR R. K. Guy, Dec 13 2001 EXTENSIONS More terms from Vladeta Jovovic and Klaus Brockhaus, Dec 13 2001 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 20 16:34 EDT 2019. Contains 325185 sequences. (Running on oeis4.)