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.

A058898 Inconsummate numbers in base 2: no number is this multiple of the sum of its digits (in base 2).

This page as a plain text file.
%I A058898 #34 May 09 2023 19:06:27
%S A058898 13,19,25,26,35,38,47,49,50,52,55,67,70,76,94,95,97,98,100,103,104,
%T A058898 109,110,115,117,131,134,140,151,152,157,159,171,175,179,183,185,187,
%U A058898 188,190,193,194,196,199,200,203,206,208,217,218,220,227,229
%N A058898 Inconsummate numbers in base 2: no number is this multiple of the sum of its digits (in base 2).
%C A058898 Equivalently, these are the natural numbers that cannot be written as the arithmetic mean of distinct powers of 2. - _Brian Kell_, Feb 28 2009
%H A058898 Daniel Mondot, <a href="/A058898/b058898.txt">Table of n, a(n) for n = 1..33099</a>
%F A058898 n such that A065413(n) = 0. - _Brian Kell_, Mar 01 2009
%p A058898 For Maple code see A058906.
%t A058898 Do[k = n; While[ Apply[ Plus, IntegerDigits[k, 2] ]*n != k && k < 250n, k += n]; If[k == 250n, Print[n] ], {n, 1, 10^3} ]
%o A058898 (Python)
%o A058898 from itertools import count, islice, combinations_with_replacement
%o A058898 def A058898_gen(startvalue=1): # generator of terms >= startvalue
%o A058898     for n in count(max(startvalue,1)):
%o A058898         for l in count(1):
%o A058898             if l*n < 1<<l-1:
%o A058898                 yield n
%o A058898                 break
%o A058898             for d in combinations_with_replacement((0,1),l):
%o A058898                 if (s:=sum(d))>0 and sorted(bin(s*n)[2:]) == [str(e) for e in d]:
%o A058898                     break
%o A058898             else:
%o A058898                 continue
%o A058898             break
%o A058898 A058898_list = list(islice(A058898_gen(),20)) # _Chai Wah Wu_, May 09 2023
%Y A058898 Cf. A003635, A052491, A058899-A058907.
%K A058898 nonn,base
%O A058898 1,1
%A A058898 _N. J. A. Sloane_, Jan 09 2001