OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3)=107 is in the sequence because 107, 109, 108107 and 108109 are primes.
MAPLE
Res:= {}:
for d from 1 to 6 do
P:= select(isprime, {seq(i, i=10^(d-1)+1..10^d, 2)});
T:= P intersect map(`-`, P, 2);
Res:= Res union select(p -> isprime((10^d+1)*p+10^d) and isprime((10^d+1)*p+10^d+2), T);
od:
sort(convert(Res, list));
MATHEMATICA
cm[{a_, b_}]:=Module[{m=(a+b)/2, il}, il=IntegerLength[m]; AllTrue[m*10^il+{a, b}, PrimeQ]]; Select[ Partition[Prime[Range[5100]], 2, 1], #[[2]]-#[[1]]==2&&cm[#]&][[;; , 1]] (* Harvey P. Dale, Feb 17 2024 *)
PROG
(Magma) [p:p in PrimesUpTo(2200)|IsPrime(p+2) and IsPrime(Seqint(Intseq(p) cat Intseq(p+1))) and IsPrime(Seqint(Intseq(p+2) cat Intseq(p+1)))]; // Marius A. Burtea, Aug 23 2019
(PARI) isok(k) = isprime(k) && isprime(k+2) && isprime(eval(Str(k+1, k))) && isprime(eval(Str(k+1, k+2))); \\ Jinyuan Wang, Aug 26 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Aug 23 2019
STATUS
approved