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!)
A075017 Smallest k such that the concatenation k, k+1,k+2,k+3 is divisible by n; or 0 if no such number exists. 0

%I #5 Jan 21 2017 09:19:50

%S 1,1,3,3,2,3,2,3,3,7,8,3,7,17,12,3,5,3,19,17,24,15,17,3,22,7,3,17,17,

%T 27,6,3,15,5,2,3,9,19,15,17,15,45,44,37,12,17,39,3,45,47,21,41,52,3,

%U 37,17,57,17,62,57,53,53,66,3,7,15,2,21,63,17,12,3,6,9,72

%N Smallest k such that the concatenation k, k+1,k+2,k+3 is divisible by n; or 0 if no such number exists.

%e a(7) = 2 as 7 divides 2345.

%o (PARI) isok(k, n) = my(v = Str(k)); for (j=1, 3, v = concat(v, Str(k+j))); (eval(v) % n) == 0;

%o a(n) = my(k=1); while (!isok(k, n), k++); k; \\ _Michel Marcus_, Jan 21 2017

%Y Cf. A075113, A075114, A075115, A075116.

%K base,nonn

%O 1,3

%A _Amarnath Murthy_, Sep 01 2002

%E Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 19 2003

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 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)