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).
LINKS
Daniel Mondot, Table of n, a(n) for n = 1..10867
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
KEYWORD
nonn,easy,nice,base
AUTHOR
STATUS
approved