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!)
A341717 a(n) = smallest m >= n such that the decimal concatenation n||n+1||n+2||...||m is prime, or -1 if no such prime exists. 10

%I #17 Feb 22 2021 21:14:36

%S 2,3,7,5,7,7,9,187

%N a(n) = smallest m >= n such that the decimal concatenation n||n+1||n+2||...||m is prime, or -1 if no such prime exists.

%C These are the values of n+k from A341715. See that entry for more information.

%C See A084559 (the same for nonprime indices) for further information. - _M. F. Hasler_, Feb 22 2021

%C Suppose n > 3. If n == 2 (mod 3), then a(n) == 3 or 5 (mod 6). If n = 0 or 1 (mod 3), then a(n) == 1 (mod 6) (see A341716). - _Chai Wah Wu_, Feb 22 2021

%F a(n) = n iff n is prime, otherwise a(n) = A084559(n). - _M. F. Hasler_, Feb 22 2021

%t Array[Block[{k = #, s = #}, While[! PrimeQ[s], k++; s = FromDigits[IntegerDigits[s]~Join~IntegerDigits[k]]]; k] &, 8, 2] (* _Michael De Vlieger_, Feb 22 2021 *)

%o (PARI) A341717(n)=if(isprime(n), n, A084559(n)) \\ _M. F. Hasler_, Feb 22 2021

%Y Cf. A084559, A140793, A341715, A341716.

%K nonn,base,more

%O 2,1

%A _N. J. A. Sloane_, Feb 22 2021

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 August 14 09:14 EDT 2024. Contains 375159 sequences. (Running on oeis4.)