OFFSET
1,3
MATHEMATICA
(* After loading the NumberTheory package *) SemiPrimeQ[n_] := (f = FactorIntegerECM[n]; PrimeQ[f] && PrimeQ[n/f]); ShenPrimeQ[n_] := (PrimeQ[n] && (PrimeQ[n + 2] || SemiPrimeQ[n + 2])); Do[k = 1; While[ !ShenPrimeQ[n^n + k], k++ ]; Print[k], {n, 100}] (* Ryan Propper, Sep 27 2006 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jason Earls, Sep 04 2005
EXTENSIONS
More terms from Ryan Propper, Sep 27 2006
STATUS
approved
