login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A066196 Primes which have an equal number of zeros and ones in their binary expansion. 5
2, 37, 41, 139, 149, 163, 197, 541, 557, 563, 569, 587, 601, 613, 617, 647, 653, 659, 661, 677, 709, 787, 809, 929, 2141, 2203, 2221, 2251, 2281, 2333, 2347, 2357, 2381, 2389, 2393, 2417, 2467, 2473, 2617, 2659, 2699, 2707, 2713, 2729, 2837, 2851, 2857 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Harry J. Smith, Table of n, a(n) for n = 1..1000

FORMULA

A000040 INTERSECT A031443. - R. J. Mathar, Jun 01 2011

MATHEMATICA

Prime[ Select[ Range[ 10^3 ], Count[ IntegerDigits[ Prime[ # ], 2 ], 0 ] == Count[ IntegerDigits[ Prime[ # ], 2 ], 1 ] & ] ]

PROG

(PARI) baseE(x, b)= { local(d, e=0, f=1); while (x>0, d=x%b; x\=b; e+=d*f; f*=10); return(e) } Count(x, d)= { local(c=0, f); while (x>9, f=x%10; if (f==d, c++); x\=10); if (x==d, c++); return(c) } { n=0; for (m=1, 10^9, p=prime(m); b=baseE(p, 2); if (Count(b, 0) == Count(b, 1), write("b066196.txt", n++, " ", p); if (n==1000, return)) ) } [From Harry J. Smith, Feb 05 2010]

CROSSREFS

Sequence in context: A178200 A049106 A042569 * A107180 A162577 A199980

Adjacent sequences:  A066193 A066194 A066195 * A066197 A066198 A066199

KEYWORD

base,nonn

AUTHOR

Robert G. Wilson v, Dec 15 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified March 28 07:51 EDT 2017. Contains 284182 sequences.