A027700 Numbers k such that the k-th prime has an even number of 1's in its binary expansion.
2, 3, 7, 9, 10, 14, 16, 20, 23, 24, 26, 30, 34, 35, 38, 45, 55, 56, 57, 59, 60, 62, 64, 66, 68, 69, 70, 71, 72, 74, 76, 77, 79, 87, 89, 91, 92, 96, 97, 99, 101, 105, 108, 109, 114, 117, 122, 124, 125, 131, 133, 137, 139, 141, 142, 146, 147, 148, 150, 152, 154, 155, 159, 165, 166, 170, 173, 176, 178
Offset: 1
Links
- T. D. Noe, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Position[Table[If[EvenQ[DigitCount[n,2,1]],1,0],{n,Prime[Range[ 200]]}],1]//Flatten (* Harvey P. Dale, Jul 11 2017 *)
-
PARI
n=0;forprime(p=2,97,n++;if(hammingweight(p)%2==0,print1(n", "))) \\ Charles R Greathouse IV, Sep 24 2012
Extensions
Extended (and corrected) by Scott Lindhurst (ScottL(AT)alumni.princeton.edu)