[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
A003635
Inconsummate numbers in base 10: no number is this multiple of the sum of its digits (in base 10).
(Formerly M5325)
21
62, 63, 65, 75, 84, 95, 161, 173, 195, 216, 261, 266, 272, 276, 326, 371, 372, 377, 381, 383, 386, 387, 395, 411, 416, 422, 426, 431, 432, 438, 441, 443, 461, 466, 471, 476, 482, 483, 486, 488, 491, 492, 493, 494, 497, 498, 516, 521, 522, 527, 531, 533, 536
OFFSET
1,1
REFERENCES
J. H. Conway, personal communication.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
MAPLE
For Maple code see A058906.
MATHEMATICA
nmax = 1000; Reap[ Do[k = n; kmax = 100*n; While[ Tr[ IntegerDigits[k]]*n != k && k < kmax, k = k + n]; If[k == kmax, Sow[n]], {n, 1, nmax}]][[2, 1]] (* Jean-François Alcover, Jul 12 2012 *)
PROG
(Python)
from itertools import count, islice, combinations_with_replacement
def A003635_gen(startvalue=1): # generator of terms >= startvalue
for n in count(max(startvalue, 1)):
for l in count(1):
if 9*l*n < 10**(l-1):
yield n
break
for d in combinations_with_replacement(range(10), l):
if (s:=sum(d))>0 and sorted(str(s*n)) == [str(e) for e in d]:
break
else:
continue
break
A003635_list = list(islice(A003635_gen(), 20)) # Chai Wah Wu, May 09 2023
KEYWORD
nonn,easy,nice,base
STATUS
approved