OFFSET
1,1
COMMENTS
Here prime(n)# denotes the primorial A002110(n), i.e., the product of the first n primes. Terms a(n) are often (but not always) prime; out of the first fifty terms, only one (a(6)=323) is composite.
EXAMPLE
(prime(2)#)^2=36. a(2)=5 because 5 is the minimal m>1 such that m+36 is prime.
MATHEMATICA
Table[m = 2; While[! PrimeQ[m + Product[Prime@ i, {i, n}]^n], m++]; m, {n, 30}] (* Michael De Vlieger, Nov 11 2015 *)
PROG
(PARI) a(n)=my(s=prod(i=1, n, prime(i))^n); nextprime(s+2)-s
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Alexei Kourbatov, Oct 30 2015
STATUS
approved