login
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.
6

%I #13 Jun 26 2013 12:08:57

%S 1,12,13,34,35,38,45,100,102,103,104,107,110,112,113,118,119,120,121,

%T 123,127,138,140,158,323,328,331,335,339,345,348,350,353,355,356,359,

%U 365,366,380,385,393,394,396,398,412,414,415,419,425,456,472,484

%N 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.

%H Charles R Greathouse IV, <a href="/A177796/b177796.txt">Table of n, a(n) for n = 1..10000</a>

%F A014499(a(n))=A035103(a(n)).

%t n1Q[n_]:=Module[{idn2=IntegerDigits[Prime[n],2]},Count[idn2,1] == Length[idn2]/2]; Select[Range[500],n1Q] (* _Harvey P. Dale_, Jun 26 2013 *)

%o (PARI) is(n)=n=prime(n);hammingweight(n)==hammingweight(bitneg(n, #binary(n))) \\ _Charles R Greathouse IV_, Mar 29 2013

%Y Cf. A031443, A014499, A035103.

%K nonn

%O 1,2

%A _Juri-Stepan Gerasimov_, May 14 2010

%E Entries checked by _D. S. McNeil_, Nov 26 2010