OFFSET
1,3
COMMENTS
It is an open problem whether there is n>1 (necessarily even) such that a(n)=0.
LINKS
J. M. Bergot, C. Rivera (Ed.), Problem 56. p1*p2*…*pk = q1+q2+…+qk, on primepuzzle.net.
MATHEMATICA
a[n_] := (primorial = Product[Prime[k], {k, 1, n}]; s = NextPrime[Quotient[primorial, n], -1]; p = s; q = s; For[k = 1, k <= n, k++, s += If[s*n > primorial*k, p = NextPrime[p - 1, -1], q = NextPrime[q + 1]]]; primorial - s + q); a[1] = 0; a[2] = 1; Table[a[n], {n, 1, 59}] (* Jean-François Alcover, Jun 11 2013, translated and adapted from Pari *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Sep 28 2011
STATUS
approved