A341715 a(n) = smallest prime of the form n||n+1||n+2||...||n+k, where || denotes decimal concatenation, or -1 if no such prime exists.
2, 3, 4567, 5, 67, 7, 89
Offset: 2
Examples
Starting at 12, 13, 14, 15, 17, 19, 20 we get the primes 1213, 13, 14151617, 1516171819, 17, 19, 20212223, which are all terms of this sequence. Here is a(9) from _Chai Wah Wu_, Feb 22 2021, a 445-digit number: 910111213141516171819202122232425262728293031323334353637383940414243444546\ 47484950515253545556575859606162636465666768697071727374757677787980818\ 28384858687888990919293949596979899100101102103104105106107108109110111\ 11211311411511611711811912012112212312412512612712812913013113213313413\ 51361371381391401411421431441451461471481491501511521531541551561571581\ 59160161162163164165166167168169170171172173174175176177178179180181182\ 183184185186187 a(16) = 16||17||...||43 is prime. Also for a(10), I searched up to k <= 10000, so if it exists it will have tens of thousands of decimal digits. Some other big terms are: for n = 18, k = 3589; for n = 35, k = 568; for n = 66, k = 937; for n = 275, k = 814. - _Chai Wah Wu_, Feb 22 2021
Links
- N. J. A. Sloane, Table of n, k, with a question-mark for unknown values
- N. J. A. Sloane, Exciting Number Sequences (video of talk), Mar 05 2021.
Crossrefs
Programs
-
Mathematica
Array[Block[{k = #, s = #}, While[! PrimeQ[s], k++; s = FromDigits[IntegerDigits[s]~Join~IntegerDigits[k]]]; s] &, 8, 2] (* Michael De Vlieger, Feb 22 2021 *)
-
PARI
A341715(n)=if(isprime(n),n,eval(concat([Str(k)|k<-[n..A084559(n)]]))) \\ M. F. Hasler, Feb 22 2021
-
Python
from sympy import isprime def A341715(n): m, k = n, n while not isprime(m): k += 1 m = int(str(m)+str(k)) return m # Chai Wah Wu, Feb 22 2021
Formula
a(n) = concatenate(n, ..., A084559(n)) or a(n) = n if n is prime. - M. F. Hasler, Feb 22 2021
Comments