login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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))):
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
Cf. similar sequences listed in A249374.
Sequence in context: A298019 A169605 A216532 * A212492 A234310 A141338
KEYWORD
nonn,base
AUTHOR
Pierre CAMI, Oct 27 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)