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.

A168161 Primes p which are equal to the sum of the binary digits in all primes <= p.

Original entry on oeis.org

3, 5, 11, 19, 23, 47, 61
Offset: 1

Views

Author

M. F. Hasler, Nov 22 2009

Keywords

Comments

A subsequence of A168162.

Crossrefs

Programs

  • Mathematica
    sbdQ[n_]:=Total[Flatten[IntegerDigits[#,2]&/@Prime[Range[PrimePi[ n]]]]] == n; Select[Prime[Range[20]],sbdQ] (* Harvey P. Dale, Feb 04 2015 *)
  • PARI
    s=0; forprime(p=1, 9999, if(p==s+=norml2(binary(p)), print1(p, ", ")))

Formula

A168161 = { prime p | p=A095375(pi(p)) }, where pi(n) = A000720(n).

Extensions

Cross reference added by Harvey P. Dale, Mar 26 2013