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.

A072602 Numbers such that in base 2 the number of 0's is >= the number of 1's.

Original entry on oeis.org

2, 4, 8, 9, 10, 12, 16, 17, 18, 20, 24, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 44, 48, 49, 50, 52, 56, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 76, 80, 81, 82, 84, 88, 96, 97, 98, 100, 104, 112, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2002

Keywords

Examples

			8 is present because '1000' contains 3 '0's and 1 '1': 3 >= 1;
9 is present because '1001' contains 2 '0's and 2 '1's: 2 >= 2.
		

Crossrefs

Programs

  • Haskell
    a072602 n = a072602_list !! (n-1)
    a072602_list = filter ((>= 0) . a037861) [1..]
    -- Reinhard Zumkeller, Mar 31 2015
    
  • Mathematica
    Select[Range[150],DigitCount[#,2,0]>=DigitCount[#,2,1]&] (* Harvey P. Dale, May 09 2012 *)
  • PARI
    is(n)=2*hammingweight(n)<=exponent(n)+1 \\ Charles R Greathouse IV, Apr 18 2020

Extensions

Edited by N. J. A. Sloane, Jun 23 2009