login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A292885 a(n) is the least number k such that k | concat(k-n,k-n+1,…,k,…,k+n-1,k+n). 1
1, 3, 3, 9, 6, 9, 9, 9, 9, 27, 15, 33, 18, 27, 18, 21, 18, 27, 27, 27, 24, 27, 27, 27, 27, 27, 27, 143, 34, 143, 45, 63, 36, 39, 39, 45, 42, 143, 89, 57, 45, 43, 143, 99, 54, 135, 154, 63, 63, 63, 75, 63, 154, 189, 66, 165, 72, 171, 153, 189, 90, 63, 81, 69, 69 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
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
Sequence in context: A124871 A197414 A247571 * A227075 A165351 A215665
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Sep 26 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)