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.

A177796 Numbers n such that number of 1's in binary representation of n-th prime = number of 0's in binary representation of n-th prime.

Original entry on oeis.org

1, 12, 13, 34, 35, 38, 45, 100, 102, 103, 104, 107, 110, 112, 113, 118, 119, 120, 121, 123, 127, 138, 140, 158, 323, 328, 331, 335, 339, 345, 348, 350, 353, 355, 356, 359, 365, 366, 380, 385, 393, 394, 396, 398, 412, 414, 415, 419, 425, 456, 472, 484
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 14 2010

Keywords

Crossrefs

Programs

  • Mathematica
    n1Q[n_]:=Module[{idn2=IntegerDigits[Prime[n],2]},Count[idn2,1] == Length[idn2]/2]; Select[Range[500],n1Q] (* Harvey P. Dale, Jun 26 2013 *)
  • PARI
    is(n)=n=prime(n);hammingweight(n)==hammingweight(bitneg(n, #binary(n))) \\ Charles R Greathouse IV, Mar 29 2013

Formula

A014499(a(n))=A035103(a(n)).

Extensions

Entries checked by D. S. McNeil, Nov 26 2010