%I #19 May 10 2023 12:18:22
%S 29,41,71,83,93,111,113,114,116,117,122,123,125,135,137,143,146,153,
%T 164,167,191,197,201,237,242,263,275,279,282,284,285,291,303,305,311,
%U 323,326,327,332,359,362,369,372,375,377,382,383,389,407,410
%N Inconsummate numbers in base 4: no number is this multiple of the sum of its digits (in base 4).
%H Daniel Mondot, <a href="/A058900/b058900.txt">Table of n, a(n) for n = 1..15650</a>
%p For Maple code see A058906.
%o (Python)
%o from itertools import count, islice, combinations_with_replacement
%o from sympy.ntheory import digits
%o def A058900_gen(startvalue=1): # generator of terms >= startvalue
%o for n in count(max(startvalue,1)):
%o for l in count(1):
%o if 3*l*n < 1<<((l-1)<<1):
%o yield n
%o break
%o for d in combinations_with_replacement((0,1,2,3),l):
%o if (s:=sum(d)) > 0 and sorted(digits(s*n,4)[1:]) == list(d):
%o break
%o else:
%o continue
%o break
%o A058900_list = list(islice(A058900_gen(),20)) # _Chai Wah Wu_, May 10 2023
%Y Cf. A003635, A052491, A058898-A058907.
%K nonn,base
%O 1,1
%A _N. J. A. Sloane_, Jan 09 2001
|