|
|
A249379
|
|
Prime numbers Q such that the concatenation Q,7,Q is prime.
|
|
3
|
|
|
3, 131, 137, 149, 167, 191, 233, 269, 359, 389, 443, 467, 563, 587, 593, 599, 617, 683, 701, 743, 797, 839, 947, 1049, 1097, 1109, 1163, 1187, 1277, 1283, 1319, 1409, 1433, 1451, 1553, 1607, 1871, 1889, 1901, 1913, 2111, 2141
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
373 is prime so a(1)=3.
|
|
MAPLE
|
q:= n-> isprime(parse(cat(n, 7, n))):
|
|
PROG
|
(PFGW & SCRIPT), the pre10.txt file with the first 10000000 prime numbers.
SCRIPT
DIM i, 0
DIM j
DIM k
DIM n, 1
OPENFILEOUT myf, a(n).txt
OPENFILEIN maf, pre10.txt
GETNEXT j, maf
LABEL loop1
GETNEXT j, maf
IF j>10^n THEN SET n, n+1
SET k, j*10^(n+1)+7*10^n+j
PRP k
IF ISPRP THEN GOTO w
GOTO loop1
LABEL w
SET i, i+1
WRITE myf, j
IF i>9999 THEN END
GOTO loop1
(PARI) lista(nn) = {forprime(p=1, nn, if (isprime(eval(concat(concat(Str(p), 7), Str(p)))), print1(p, ", ")); ); } \\ Michel Marcus, Oct 27 2014
(Magma) [p: p in PrimesUpTo(3000) | IsPrime(Seqint(Intseq(p) cat [7] cat Intseq(p)))]; // Vincenzo Librandi, Oct 27 2014
|
|
CROSSREFS
|
Cf. similar sequences listed in A249374.
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|