|
|
A249375
|
|
Prime numbers Q such that the concatenation Q,2,Q is prime.
|
|
3
|
|
|
7, 19, 31, 61, 79, 193, 283, 367, 373, 421, 499, 547, 619, 733, 751, 883, 997, 1021, 1033, 1039, 1069, 1153, 1171, 1279, 1399, 1483, 1543, 1567, 1753, 1831, 1879, 1951, 1999, 2083, 2161, 2179, 2251, 2281, 2287, 2503, 2671, 2707, 2713, 2767, 2797, 2953, 3019
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
323 is composite, 525 is composite, 727 is prime so a(1)=7.
|
|
MAPLE
|
q:= n-> isprime(parse(cat(n, 2, n))):
|
|
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))
|
|
CROSSREFS
|
Cf. similar sequences listed in A249374.
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|