OFFSET
2,1
COMMENTS
a(1) is unknown, but is believed to exist (see A007908). The corresponding value of k, if it exists, is known to be at least 300000, so in any case this prime would be too large to include in an OEIS entry, which is why this sequence has offset 2.
a(9) = 9||10||...||187 (see Example section), but that is too large to show in the data field. a(A030457(n)) = A030457(n)||A030457(n)+1 and k = 1 for n > 1. If m is in A030470 but not in A030457, then a(m) = m||m+1||m+2||m+3 and k = 3. Of course a(p) = p and k = 0 for p prime. - Chai Wah Wu, Feb 22 2021
See also A140793 = (23, 345...109, 4567, 567...17, ...), A341720, and A084559 for the variant with k >= 1, so that a(n) > n also for prime n. - M. F. Hasler, 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.
FORMULA
a(n) = concatenate(n, ..., A084559(n)) or a(n) = n if n is prime. - M. F. Hasler, Feb 22 2021
EXAMPLE
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
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 *)
PROG
(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
(PARI) A341715(n)=if(isprime(n), n, eval(concat([Str(k)|k<-[n..A084559(n)]]))) \\ M. F. Hasler, Feb 22 2021
CROSSREFS
KEYWORD
nonn,base,more,nice
AUTHOR
N. J. A. Sloane, Feb 21 2021
STATUS
approved