OFFSET
1,1
COMMENTS
Equivalently, these are the natural numbers that cannot be written as the arithmetic mean of distinct powers of 2. - Brian Kell, Feb 28 2009
LINKS
Daniel Mondot, Table of n, a(n) for n = 1..33099
FORMULA
n such that A065413(n) = 0. - Brian Kell, Mar 01 2009
MAPLE
For Maple code see A058906.
MATHEMATICA
Do[k = n; While[ Apply[ Plus, IntegerDigits[k, 2] ]*n != k && k < 250n, k += n]; If[k == 250n, Print[n] ], {n, 1, 10^3} ]
PROG
(Python)
from itertools import count, islice, combinations_with_replacement
def A058898_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
for l in count(1):
if l*n < 1<<l-1:
yield n
break
for d in combinations_with_replacement((0, 1), l):
if (s:=sum(d))>0 and sorted(bin(s*n)[2:]) == [str(e) for e in d]:
break
else:
continue
break
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jan 09 2001
STATUS
approved