login
n-th prime has odd number of 1's in binary expansion and (n+1)st prime also has odd number of 1's.
2

%I #9 Sep 07 2020 19:27:52

%S 4,5,11,12,17,18,21,27,28,31,32,36,39,40,41,42,43,46,47,48,49,50,51,

%T 52,53,80,81,82,83,84,85,93,94,102,103,106,110,111,112,115,118,119,

%U 120,126,127,128,129,134,135,143,144,156,157,160,161,162,163,167,168,171

%N n-th prime has odd number of 1's in binary expansion and (n+1)st prime also has odd number of 1's.

%H Harvey P. Dale, <a href="/A027708/b027708.txt">Table of n, a(n) for n = 0..1000</a>

%t SequencePosition[Table[If[OddQ[DigitCount[p,2,1]],1,0],{p,Prime[ Range[ 200]]}],{1,1}][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Sep 07 2020 *)

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_.

%E More terms from _Erich Friedman_.