A168154 Numbers n such that the sum of binary digits in prime(1), ..., prime(n) is prime.
2, 3, 5, 8, 9, 15, 18, 21, 28, 34, 35, 45, 51, 53, 68, 77, 84, 86, 87, 90, 92, 102, 113, 116, 119, 121, 130, 131, 137, 149, 164, 174, 178, 192, 205, 210, 220, 221, 238, 240, 241, 250, 255, 275, 315, 318, 324, 344, 345, 363, 369, 375, 381, 386, 396, 397, 398, 404
Offset: 1
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A168153.
Programs
-
Mathematica
Module[{nn=500,prs},prs=Table[IntegerDigits[p,2],{p,Prime[Range[nn]]}];Select[Range[nn],PrimeQ[Total[Flatten[Take[prs,#]]]]&]] (* Harvey P. Dale, Aug 28 2021 *)
-
PARI
s=0; for(n=1,999, isprime(s+=norml2(binary(prime(n)))) & print1(n", ")) is_A168154(n)=isprime(A095375(n))
-
PARI
s=n=0;forprime(p=2,1e9,n++;if(isprime(s+=hammingweight(p)), print1(n", "))) \\ Charles R Greathouse IV, Mar 29 2013
Extensions
Terms corrected by Charles R Greathouse IV, Mar 29 2013
Comments