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.

A094694 Numbers having in binary representation more 1s than their squares.

Original entry on oeis.org

23, 46, 47, 92, 94, 95, 111, 184, 188, 190, 191, 222, 223, 367, 368, 376, 380, 382, 383, 415, 444, 446, 447, 479, 727, 734, 736, 752, 760, 764, 766, 767, 830, 831, 887, 888, 892, 894, 895, 958, 959, 1451, 1454, 1468, 1471, 1472, 1503, 1504, 1520, 1528
Offset: 1

Views

Author

Reinhard Zumkeller, May 20 2004

Keywords

Comments

A000120(a(n)) > A000120(A000290(a(n))).

Crossrefs

Programs

  • Mathematica
    Select[Range[1600], DigitCount[#, 2, 1] > DigitCount[#^2, 2, 1] &] (* Harvey P. Dale, Mar 24 2012 *)
  • PARI
    is(n)=hammingweight(n)>hammingweight(n^2) \\ Charles R Greathouse IV, Jan 27 2014
    
  • Python
    print([k for k in range(0, 1530) if bin(k)[2:].count("1") > bin(k**2)[2:].count("1")]) # Karl-Heinz Hofmann, Feb 07 2022