OFFSET
1,4
COMMENTS
k*p(n)# + p(n+1) is the least prime > k*p(n)# + p(n+1)+1 and if k*p(n)# + p(n+1)+1 is not prime it is the least prime > k*p(n)# + p(n+1).
EXAMPLE
6 is the least k for n = 5 because 6*p(5)# + p(6) = 6*2*3*5*7*11+13 = 13873.
MATHEMATICA
A002110[n_] := Product[Prime[i], {i, n}]; a[n_]:=Module[{k=1}, While[!PrimeQ[k*A002110[n]+Prime[n+1]], k++]; k]; Array[a, 85] (* Stefano Spezia, Aug 14 2024 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Pierre CAMI, Jan 21 2004
STATUS
approved