login
A249381
Prime numbers Q such that the concatenation Q,9,Q is prime.
3
7, 13, 19, 41, 43, 47, 61, 67, 71, 73, 79, 83, 89, 107, 137, 149, 173, 179, 211, 229, 269, 277, 281, 283, 379, 401, 431, 443, 491, 523, 547, 557, 577, 599, 607, 613, 619, 647, 683, 691, 823, 863, 877, 919, 977, 1031, 1069, 1091, 1151, 1171, 1213, 1249, 1259
OFFSET
1,1
EXAMPLE
393 is composite.
595 is composite.
797 is prime so a(1)=7.
11911 is composite.
13913 is prime so a(2)=13.
MATHEMATICA
Select[Prime[Range[200]], PrimeQ[FromDigits[Join[IntegerDigits[#], {9}, IntegerDigits[ #]]]]&] (* Harvey P. Dale, Jul 25 2015 *)
PROG
(PARI) lista(nn) = {forprime(p=1, nn, if (isprime(eval(concat(concat(Str(p), 9), Str(p)))), print1(p, ", ")); ); } \\ Michel Marcus, Oct 27 2014
(Magma) [p: p in PrimesUpTo(3000) | IsPrime(Seqint(Intseq(p) cat [9] cat Intseq(p)))]; // Vincenzo Librandi, Oct 27 2014
(Python)
from sympy import isprime, primerange
def ok(p): swb = str(p); return isprime(int(swb + '9' + swb))
def aupto(lim): return [p for p in primerange(1, lim+1) if ok(p)]
print(aupto(1260)) # Michael S. Branicky, Jul 13 2021
CROSSREFS
Cf. similar sequences listed in A249374.
Sequence in context: A110074 A058383 A005471 * A040096 A358322 A181938
KEYWORD
nonn,base
AUTHOR
Pierre CAMI, Oct 27 2014
STATUS
approved