OFFSET
2,1
PROG
(PARI) a(n) = b=prod(i=1, n, prime(i)); k={my(k=1); while(omega(b+k)<(n-1), k++); k; }; b+k
(PARI) a(n) = my(A=vecprod(primes(n)), B=2*A); (f(m, p, j) = my(r=oo); forprime(q=p, sqrtnint(B\m, j), my(v=m*q); while(v <= B, if(j==1, if(v>=A && v < r, r = v; B = v-1), if(v*(q+1) <= B, r = min(r, f(v, q+1, j-1)))); v *= q)); r); f(1, 2, n-1); \\ Daniel Suteu, Sep 22 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Gionata Neri, Sep 30 2017
EXTENSIONS
a(12)-a(19) from Daniel Suteu, Sep 22 2023
STATUS
approved