OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The concatenation of the divisors of 7 is 17; 175 = 25*7 is the smallest multiple of 7 that begins with 17, so a(7) = 175.
MAPLE
cdiv:= proc(n) local D, R, j;
D:= sort(convert(numtheory:-divisors(n), list));
R:= D[1];
for j from 2 to nops(D) do
R:= R * 10^(1+ilog10(D[j])) + D[j];
od;
R
end proc:
f:= proc(n) local t, i, r;
t:= cdiv(n);
for i from 0 do
r:= n * ceil(t*10^i/n);
if r < (t+1)*10^i then return r fi
od
end proc:
map(f, [$1..50]); # Robert Israel, Oct 07 2024
PROG
(PARI) {for(n=1, 31, k=floor(log(n)/log(10))+1; d=divisors(n); v=Str(); for(i=1, matsize(d)[2], v=concat(v, Str(d[i]))); s=eval(v); t=s+1; m=floor(log(s)/log(10))+1; d=k-m; s=s*10^d; t=t*10^d; b=1; while(b>0, q=floor(s/n); while(b>0&&(p=q*n)<t, if(p>=s, print1(p, ", "); b=0, q++)); s=10*s; t=10*t))}
CROSSREFS
KEYWORD
AUTHOR
Amarnath Murthy, Nov 22 2002
EXTENSIONS
Edited and extended by Klaus Brockhaus, Dec 06 2002
STATUS
approved