OFFSET
1,2
COMMENTS
Note that a number that starts with n and is divisible by lcm(1, 2, ..., 9) = 2520 always satisfies the conditions. And there is such a number between n0000 and n2519. Therefore a(n) < 10000n + 2520. Hence to find a(n) one needs to check numbers n, n0..n9, n00..n99, n000..n999, n0000..n2519.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
TopCoder problem DivisibleByDigits
MAPLE
f:= proc(n) local r, d, q ;
r:= ilcm(op(convert(convert(n, base, 10), set) minus {0, 1}));
if n mod r = 0 then return n fi;
for d from 1 do
q:= -(n*10^d) mod r;
if q < 10^d then return n*10^d+q fi;
od
end proc:
map(f, [$1..100]); # Robert Israel, Feb 01 2017
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Mikhail Dvorkin (mikhail.dvorkin(AT)gmail.com), Nov 10 2007
STATUS
approved