%I #22 Sep 08 2022 08:46:10
%S 3,7,19,61,67,109,139,277,337,349,523,547,727,751,823,853,859,883,991,
%T 1009,1063,1093,1231,1237,1279,1291,1321,1423,1429,1447,1531,1609,
%U 1657,1723,1759,1867,1933,1951,2089,2113,2131,2683
%N Prime numbers Q such that the concatenation Q,8,Q is prime.
%H Pierre CAMI, <a href="/A249380/b249380.txt">Table of n, a(n) for n = 1..10000</a>
%e 383 is prime so a(1)=3.
%e 585 is composite, 787 is prime so a(2)=7.
%o (PFGW & SCRIPT), the pre10.txt file with the first 10000000 prime numbers.
%o SCRIPT
%o DIM i,0
%o DIM j
%o DIM k
%o DIM n,1
%o OPENFILEOUT myf,a(n).txt
%o OPENFILEIN maf,pre10.txt
%o GETNEXT j,maf
%o LABEL loop1
%o GETNEXT j,maf
%o IF j>10^n THEN SET n,n+1
%o SET k,j*10^(n+1)+8*10^n+j
%o PRP k
%o IF ISPRP THEN GOTO w
%o GOTO loop1
%o LABEL w
%o SET i,i+1
%o WRITE myf,j
%o IF i>9999 THEN END
%o GOTO loop1
%o (PARI) lista(nn) = {forprime(p=1, nn, if (isprime(eval(concat(concat(Str(p), 8), Str(p)))), print1(p, ", ")););} \\ _Michel Marcus_, Oct 27 2014
%o (Magma) [p: p in PrimesUpTo(3000) | IsPrime(Seqint(Intseq(p) cat [8] cat Intseq(p)))]; // _Vincenzo Librandi_, Oct 27 2014
%Y Cf. similar sequences listed in A249374.
%K nonn,base
%O 1,1
%A _Pierre CAMI_, Oct 27 2014