A377838 Let p = prime(n), then a(n) is the least prime q < p such that p * q# + 1 is prime.
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
Keywords
Examples
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.
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.
Crossrefs
Cf. A034386.
Programs
-
PARI
a(n)=p=prime(n);m=p;forprime(q=2,p-1,m*=q;ispseudoprime(m+1)&&return(q));error("none")
Comments