OFFSET
2,1
COMMENTS
The notation q# means A034386(q).
Buhler, Crandall and Penk conjecture a(n) exists for all n > 1.
LINKS
Jeppe Stig Nielsen, Table of n, a(n) for n = 2..10001
J. P. Buhler, R. E. Crandall and M. A. Penk, Primes of the form n! ± 1 and 2 · 3 · 5 ··· p ± 1, Math. Comp. 38 (1982), 639-643.
EXAMPLE
For a(122), consider 673, the 122nd prime. Search for primes of form 673*2*3*5*7*...*q + 1. The first such prime appears at q=509 (and 509 is less than 673). Therefore a(122) = 509.
PROG
(PARI) a(n)=p=prime(n); m=p; forprime(q=2, p-1, m*=q; ispseudoprime(m+1)&&return(q)); error("none")
CROSSREFS
KEYWORD
nonn
AUTHOR
Jeppe Stig Nielsen, Nov 09 2024
STATUS
approved