OFFSET
1,1
COMMENTS
The sequence is infinite because 10^n, n = 1,2,3, .... are terms. - Marius A. Burtea, Sep 07 2019
LINKS
Marius A. Burtea, Table of n, a(n) for n = 1..5000
EXAMPLE
1103 is on the list since 1103 is 10001001111 (sum=6), 1+1+0+3=5.
MATHEMATICA
Select[Range[1103], Total@IntegerDigits[#, 2] > Total@IntegerDigits[#, 10] &] (* Amiram Eldar, Sep 07 2019 *)
PROG
(PARI) isok(n) = hammingweight(n) > sumdigits(n); \\ Michel Marcus, Sep 07 2019
(Magma) [n:n in [1..1200]| &+Intseq(n, 2) gt &+Intseq(n, 10)]; // Marius A. Burtea, 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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
John L. Drost, Jul 25 2005
EXTENSIONS
a(36) added by Marius A. Burtea, Sep 07 2019
STATUS
approved