The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A095073 Primes in whose binary expansion the number of 1-bits is one more than the number of 0-bits. 3
 5, 19, 71, 83, 89, 101, 113, 271, 283, 307, 313, 331, 397, 409, 419, 421, 433, 457, 1103, 1117, 1181, 1223, 1229, 1237, 1303, 1307, 1319, 1381, 1427, 1429, 1433, 1481, 1489, 1559, 1579, 1607, 1613, 1619, 1621, 1637, 1699, 1733, 1811, 1861 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Indranil Ghosh, Table of n, a(n) for n = 1..25000 A. Karttunen and J. Moyer, C-program for computing the initial terms of this sequence EXAMPLE 71 is in the sequence because 71_10 = 1000111_2. '1000111' has four 1's and three 0's. - Indranil Ghosh, Feb 03 2017 MATHEMATICA Select[Prime[Range[500]], Differences[DigitCount[#, 2]] == {-1} &] PROG (PARI) { forprime(p=2, 2000,   v=binary(p); s=0;   for(k=1, #v, s+=if(v[k]==1, +1, -1));   if(s==1, print1(p, ", ")) ) } (Python) from symy import isprime i=1 j=1 while j<=25000: ....if isprime(i)==True and bin(i)[2:].count("1")-bin(i)[2:].count("0")==1: ........print str(j)+" "+str(i) ........j+=1 ....i+=1 # Indranil Ghosh, Feb 03 2017 CROSSREFS Intersection of A000040 and A031448. Subset of A095070. Cf. A095053. Sequence in context: A026590 A243413 A222538 * A128349 A255449 A296630 Adjacent sequences:  A095070 A095071 A095072 * A095074 A095075 A095076 KEYWORD nonn,base,easy AUTHOR Antti Karttunen, Jun 01 2004 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 April 11 14:29 EDT 2021. Contains 342886 sequences. (Running on oeis4.)