cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A341715 #82 May 02 2021 12:34:22
%S A341715 2,3,4567,5,67,7,89
%N 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.
%C A341715 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.
%C A341715 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
%C A341715 For the corresponding values of k and n+k, see A341716 and A341717.
%C A341715 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
%H A341715 N. J. A. Sloane, <a href="/A341715/a341715.txt">Table of n, k, with a question-mark for unknown values</a>
%H A341715 N. J. A. Sloane, <a href="https://www.youtube.com/watch?v=9ogbsh8KuEM">Exciting Number Sequences</a> (video of talk), Mar 05 2021.
%F A341715 a(n) = concatenate(n, ..., A084559(n)) or a(n) = n if n is prime. - _M. F. Hasler_, Feb 22 2021
%e A341715 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.
%e A341715 Here is a(9) from _Chai Wah Wu_, Feb 22 2021, a 445-digit number:
%e A341715 910111213141516171819202122232425262728293031323334353637383940414243444546\
%e A341715     47484950515253545556575859606162636465666768697071727374757677787980818\
%e A341715     28384858687888990919293949596979899100101102103104105106107108109110111\
%e A341715     11211311411511611711811912012112212312412512612712812913013113213313413\
%e A341715     51361371381391401411421431441451461471481491501511521531541551561571581\
%e A341715     59160161162163164165166167168169170171172173174175176177178179180181182\
%e A341715     183184185186187
%e A341715 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
%t A341715 Array[Block[{k = #, s = #}, While[! PrimeQ[s], k++; s = FromDigits[IntegerDigits[s]~Join~IntegerDigits[k]]]; s] &, 8, 2] (* _Michael De Vlieger_, Feb 22 2021 *)
%o A341715 (Python)
%o A341715 from sympy import isprime
%o A341715 def A341715(n):
%o A341715     m, k = n, n
%o A341715     while not isprime(m):
%o A341715         k += 1
%o A341715         m = int(str(m)+str(k))
%o A341715     return m # _Chai Wah Wu_, Feb 22 2021
%o A341715 (PARI) A341715(n)=if(isprime(n),n,eval(concat([Str(k)|k<-[n..A084559(n)]]))) \\ _M. F. Hasler_, Feb 22 2021
%Y A341715 Cf. A007908, A030457, A030470, A030471, A135605, A341716, A341717, A341718.
%Y A341715 If k in the definition is allowed to be zero we get [the present sequence, A341716, A341717], but if we require k>0 we get [A140793, A341720, A084559].
%Y A341715 See A075022 for the largest prime factor of 1||2||...||n.
%K A341715 nonn,base,more,nice
%O A341715 2,1
%A A341715 _N. J. A. Sloane_, Feb 21 2021