login
A377838
Let p = prime(n), then a(n) is the least prime q < p such that p * q# + 1 is prime.
1
2, 2, 3, 2, 3, 3, 5, 2, 2, 13, 3, 2, 5, 3, 2, 7, 3, 5, 5, 3, 5, 2, 2, 11, 3, 3, 3, 5, 2, 13, 2, 3, 7, 13, 3, 7, 7, 5, 2, 2, 3, 2, 5, 13, 11, 29, 5, 19, 5, 2, 2, 3, 2, 3, 3, 13, 3, 3, 2, 3, 2, 13, 3, 3, 5, 3, 5, 3, 7, 7, 2, 3, 3, 11, 5, 67, 3, 7, 17, 2, 7, 2, 7
OFFSET
2,1
COMMENTS
The notation q# means A034386(q).
Buhler, Crandall and Penk conjecture a(n) exists for all n > 1.
LINKS
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
Cf. A034386.
Sequence in context: A239500 A029204 A241085 * A057334 A375674 A048475
KEYWORD
nonn
AUTHOR
Jeppe Stig Nielsen, Nov 09 2024
STATUS
approved