OFFSET
0,1
COMMENTS
a(0)=a(1)=2 because the product over the empty set is defined here as 1. For S to be a prime, the positive integers <= n, except 1 and the primes > n/2, must all be together in either {b(k)} or {c(k)}. If p is a prime where n/2 < p <= n, then it is possible that p is in either product of the S sum, as can 1. Terms calculated by W. Edwin Clark.
LINKS
Ray Chandler, Table of n, a(n) for n=0..100
EXAMPLE
For n = 6 we have the only prime S (and so the maximum prime S) with S = 1*2*3*4*6 + 5 = 149.
MATHEMATICA
f[n_] := Block[{d = Divisors[Times @@ Select[Range[n], PrimeQ[ # ] && 2# > n &]]}, Select[Union[d + n!/d], PrimeQ]]; If[ # == {}, 0, Last[ # ]] & /@ Array[f, 30, 0] (* Ray Chandler, Feb 14 2007 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jan 06 2007
EXTENSIONS
a(21)-a(35) from Ray Chandler, Feb 14 2007
STATUS
approved