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.

Showing 1-1 of 1 results.

A108580 Numbers whose sum of bits when written in binary > sum of decimal digits.

Original entry on oeis.org

10, 11, 30, 31, 100, 101, 102, 103, 110, 111, 120, 121, 200, 201, 210, 211, 220, 221, 300, 301, 310, 311, 500, 501, 510, 511, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1010, 1011, 1012, 1013, 1014, 1015, 1020, 1021, 1022, 1023, 1100, 1101, 1102, 1103
Offset: 1

Views

Author

John L. Drost, Jul 25 2005

Keywords

Comments

The sequence is infinite because 10^n, n = 1,2,3, .... are terms. - Marius A. Burtea, Sep 07 2019

Examples

			1103 is on the list since 1103 is 10001001111 (sum=6), 1+1+0+3=5.
		

Crossrefs

Subsequence of A325483.

Programs

  • Magma
    [n:n in [1..1200]| &+Intseq(n,2) gt &+Intseq(n,10)];  // Marius A. Burtea, Sep 07 2019
    
  • Mathematica
    Select[Range[1103], Total@IntegerDigits[#, 2] > Total@IntegerDigits[#, 10] &] (* Amiram Eldar, Sep 07 2019 *)
  • PARI
    isok(n) = hammingweight(n) > sumdigits(n); \\ Michel Marcus, Sep 07 2019
    
  • Python
    def ok(n): return sum(map(int, str(n))) < bin(n).count('1')
    print(list(filter(ok, range(1104)))) # Michael S. Branicky, Oct 11 2021

Extensions

a(36) added by Marius A. Burtea, Sep 07 2019
Showing 1-1 of 1 results.