OFFSET
1,1
LINKS
Jinyuan Wang, Table of n, a(n) for n = 1..200
MAPLE
A[1]:= 2: P:= 1:
for n from 2 to 30 do
P:= A[n-1]*P;
p0:= nextprime(A[n-1]);
p:= p0;
while p-1 <= P and P mod (p-1) <> 0 do
p:= nextprime(p)
od:
if p-1 > P then A[n]:= p0
else A[n]:= p
fi;
od:
seq(A[i], i=1..30); # Robert Israel, Mar 17 2017
PROG
(PARI) lista(nn) = {my(d, k, m, t, v=List([2])); for(n=2, nn, k=1; m=oo; while((d=prod(i=1, t=k, v[i]))<m && k++<n, until(v[t]*d>m || t==n-1, t++); forsubset([t, k], w, if(ispseudoprime(d=prod(i=1, k, v[w[i]])+1) && d>v[n-1], m=min(m, d)))); listput(v, if(m<oo, m, nextprime(v[n-1]+1)))); v; } \\ Jinyuan Wang, Nov 21 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Feb 13 2017
EXTENSIONS
Corrected and extended by Robert Israel, Mar 17 2017
More terms from Jinyuan Wang, Nov 21 2020
STATUS
approved