OFFSET
0,2
LINKS
Paolo P. Lava, Table of n, a(n) for n = 0..500
EXAMPLE
a(4) = 6 because concat(2, 3, 4, 5, 6, 7, 8, 9, 10) = 2345678910 is a multiple of 6 and 6 is the least number to have this property.
MAPLE
P:=proc(q) local a, j, k, n; for k from 1 by 2 to q do for n from 1 to q do a:=n;
for j from 1 to k-1 do a:=a*10^(ilog10(n+j)+1)+n+j; od;
if type(a/(n+(k-1)/2), integer) then print(n+(k-1)/2); break; fi; od; od; end: P(10^9);
MATHEMATICA
Table[SelectFirst[Range[10^3], Function[k, If[And[FreeQ[#, _?(# < 0 &)], First@ # != 0], Divisible[FromDigits@ Flatten@ Map[IntegerDigits, #], k]] &[k + Range[-n, n]] ] ], {n, 0, 64}] (* Michael De Vlieger, Sep 27 2017 *)
PROG
(PARI) isok(k, n) = {my(s = ""); for (i=0, 2*n, s = concat(s, k-n+i); ); (eval(s) % k) == 0; }
a(n) = {my(k = n+1); while(!isok(k, n), k++); k; } \\ Michel Marcus, Oct 06 2017
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Sep 26 2017
STATUS
approved