
PROG

(PARI) /* Output is a vector of 6 consecutive primes for each element of the sequence, the 1st of these primes. */
{
\\ This program first checks for consistency mod 3\\
p=[5, 7, 11, 13, 17, 19]; e=[10, 100, 100, 100, 100];
while(1,
if((p[1]+p[2])%3, f=1; for(i=2, 5,
if((p[i]+p[i+1])%3, f=0; break()));
if(f, P=p[1]*e[1]+p[2]; if(ispseudoprime(P),
for(i=2, 5, P*=e[i]; P+=p[i+1]; if(ispseudoprime(P)==0,
f=0; break())); if(f, print(p)))));
for(i=1, 5, p[i]=p[i+1]); p(6)=nextprime(p[6]+1);
for(i=1, 4, e[i]=e[i+1]); if(p[6]>e[5], e[5]*=10))
}
(PARI) is(n)=my(p=n); if(!ispseudoprime(p), return(0)); for(i=1, 5, n=eval(Str(n, p=nextprime(p+1))); if(!ispseudoprime(n), return(0))); 1 \\ Charles R Greathouse IV, Oct 06 2013
