

A112889


a(n) is the least nonnegative integer in base 10 containing n zeros that is divisible by n.


20



0, 100, 3000, 10000, 100000, 3000000, 70000000, 100000000, 9000000000, 10000000000, 1000000000010, 3000000000000, 100000000000004, 700000000000000, 3000000000000000, 10000000000000000, 1000000000000000002, 9000000000000000000, 100000000000000000090
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS



FORMULA



EXAMPLE

a(3) = 3000 because 3000 contains 3 zeros and is divisible by 3.


MAPLE

f:= proc(n) local d, x, y, z, d2, v;
for x from 1 to 9 do if x*10^n mod n = 0 then return x*10^n fi od;
for y from 1 to 9 do
for d from 0 to n do
for x from 1 to 9 do
v:= y*10^(n+1) + x*10^d;
if v mod n = 0 then return v fi;
od od od;
for z from 1 to 9 do
for d from 2 to n+1 do
for y from 1 to 9 do
for d2 from 0 to d1 do
for x from 1 to 9 do
v:= z*10^(n+2) + y*10^d + x*10^d2;
if v mod n = 0 then return v fi;
od od od od od;
FAIL
end proc:
f(1):= 0:


CROSSREFS



KEYWORD

base,nonn


AUTHOR



EXTENSIONS



STATUS

approved



