OFFSET
0,3
COMMENTS
Also, a(n) is the smallest number congruent 1 modulo prime(n+1) that can be written as the product of distinct primes <= prime(n).
a(n) > 0 for 2 <= n <= 10^4. It seems that a(n) > 0 for all n >= 2.
It is surprising that a(n) is usually small compared with n. Let b(n) = (a(n) - 1)/prime(n+1) if a(n) != 0. Except for b(4) = 19, b(n) <= 14 for 2 <= n <= 10^4, and there are only 21 n's <= 10^4 such that b(n) >= 10.
FORMULA
a(2) = 6 = 2*3 = 1*5 + 1.
a(3) = 15 = 3*5 = 2*7 + 1.
a(4) = 210 = 2*3*5*7 = 19*11 + 1.
a(5) = 14 = 2*7 = 1*13 + 1.
a(6) = 35 = 5*7 = 2*17 + 1.
PROG
(PARI) a(n)=my(N=prod(i=1, n, prime(i))\prime(n+1)); for(k=1, N+1, if(k==N+1, return(0)); my(m=k*prime(n+1)+1, p=vecmax(factor(m)[, 1])); if(issquarefree(m)&&p<=prime(n), return(m)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Feb 08 2019
STATUS
approved