OFFSET
1,2
MATHEMATICA
a[1]=1; p[1]={2}; a[n_] := Module[{k, new}, For[k=a[n-1]+1, Intersection[p[n-1], (new=Select[(a/@Range[n-1])+k, PrimeQ])]!={}||new=={}, k++, Null]; p[n]=Union[p[n-1], new]; a[n]=k]
CROSSREFS
KEYWORD
nonn
AUTHOR
David W. Wilson, Apr 14 2003
STATUS
approved