A177796 Numbers n such that number of 1's in binary representation of n-th prime = number of 0's in binary representation of n-th prime.
1, 12, 13, 34, 35, 38, 45, 100, 102, 103, 104, 107, 110, 112, 113, 118, 119, 120, 121, 123, 127, 138, 140, 158, 323, 328, 331, 335, 339, 345, 348, 350, 353, 355, 356, 359, 365, 366, 380, 385, 393, 394, 396, 398, 412, 414, 415, 419, 425, 456, 472, 484
Offset: 1
Keywords
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
n1Q[n_]:=Module[{idn2=IntegerDigits[Prime[n],2]},Count[idn2,1] == Length[idn2]/2]; Select[Range[500],n1Q] (* Harvey P. Dale, Jun 26 2013 *)
-
PARI
is(n)=n=prime(n);hammingweight(n)==hammingweight(bitneg(n, #binary(n))) \\ Charles R Greathouse IV, Mar 29 2013
Extensions
Entries checked by D. S. McNeil, Nov 26 2010