login
A341720
a(n) = smallest k > 0 such that the decimal concatenation n||n+1||n+2||...||n+k is prime, or -1 if no such prime exists.
1
1, 16, 3, 12, 1, 6, 1, 178
OFFSET
2,2
COMMENTS
If they exist, a(10) > 22496; a(21)-a(22) > 17510; a(24) > 15696; a(27) > 13641; a(29)-a(32), a(40), a(41), a(43), a(45), a(46)-a(48) > 7000; a(52) > 16359; a(54) > 16458; a(55) > 14261; a(60) > 19920; a(61) > 9029; a(11) = 298, a(12) = 1, a(13) = 7284, a(14) = 3, a(15) = 4, a(16) = 27, a(17) = 22, a(18) = 3589, a(19) = 1452, a(20) = 3, a(23) = 18, a(25) = 24, a(26) = 121, a(28) = 45, a(33) = 70, a(34) = 3, a(35) = 568, a(36) = 1, a(37) = 6, a(38) = 19, a(39) = 4, a(42) = 1, a(44) = 7, a(49) = 192, a(50) = 1, a(51) = 7228, a(53) = 430, a(56) = 1, a(57) = 4, a(58) = 3, a(59) = 18. - J.W.L. (Jan) Eerland, Feb 24 2023
If it exists, a(10) > 50000. - Michael S. Branicky, Aug 29 2024
MATHEMATICA
Table[k=1; Monitor[Parallelize[While[True, If[PrimeQ[ToExpression[StringJoin[ToString/@Table[n+a, {a, 0, k}]]]], Break[]]; k++]; k], k], {n, 2, 9}] (* J.W.L. (Jan) Eerland, Dec 22 2022 *)
PROG
(PARI) f(n, k) = my(s=Str(n)); for(i=1, k, s=concat(s, n+i)); eval(s);
a(n) = my(k=1); while(!ispseudoprime(f(n, k)), k++); k; \\ Michel Marcus, Dec 22 2022
CROSSREFS
If k=0 is allowed we get the sequences [A341715, A341716, A341717], but if k must be at least 1 we get [A140793, the present sequence, A084559].
Sequence in context: A070709 A247585 A068615 * A139722 A070582 A070569
KEYWORD
nonn,base,more
AUTHOR
N. J. A. Sloane, Feb 24 2021
STATUS
approved