login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A168154
Numbers n such that the sum of binary digits in prime(1), ..., prime(n) is prime.
1
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,1
COMMENTS
Indices of primes in A095375.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
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 *)
PROG
(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
CROSSREFS
Cf. A168153.
Sequence in context: A104737 A286495 A295082 * A278334 A120057 A099422
KEYWORD
nonn,base,easy
AUTHOR
M. F. Hasler, Nov 20 2009
EXTENSIONS
Terms corrected by Charles R Greathouse IV, Mar 29 2013
STATUS
approved