cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A168154 Numbers n such that the sum of binary digits in prime(1), ..., prime(n) is prime.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Nov 20 2009

Keywords

Comments

Indices of primes in A095375.

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