OFFSET
1,1
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..10000
EXAMPLE
323 is composite, 525 is composite, 727 is prime so a(1)=7.
MAPLE
q:= n-> isprime(parse(cat(n, 2, n))):
select(q, [ithprime(i)$i=1..500])[]; # Alois P. Heinz, Jun 17 2021
MATHEMATICA
cq2Q[n_]:=Module[{idn=IntegerDigits[n]}, PrimeQ[FromDigits[Join[idn, {2}, idn]]]]; Select[Prime[Range[400]], cq2Q] (* Harvey P. Dale, Apr 17 2019 *)
PROG
(PARI) lista(nn) = {forprime(p=1, nn, if (isprime(eval(concat(concat(Str(p), 2), Str(p)))), print1(p, ", ")); ); } \\ Michel Marcus, Oct 27 2014
(Magma) [p: p in PrimesUpTo(3000) | IsPrime(Seqint(Intseq(p) cat [2] cat Intseq(p)))]; // Vincenzo Librandi, Oct 27 2014
(Python)
from sympy import isprime, primerange
def ok(p): s = str(p); return isprime(int(s+'2'+s))
print(list(filter(ok, primerange(1, 3020)))) # Michael S. Branicky, Jul 19 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Pierre CAMI, Oct 27 2014
STATUS
approved