A231017 Least prime q > p = prime(n) such that if d = q-p, then p, p+d, p+2d, ..., p+(p-1)d are all primes.
3, 5, 11, 157, 1536160091, 9918821194603, 341976204789992332577, 2166703103992332274919569
Offset: 1
Examples
Prime(3) = 5 and 5, 11, 17, 23, 29 is the smallest 5-term AP beginning with 5, so a(3) = 11.
References
- P. Ribenboim, My Numbers, My Friends, Springer, 2000; p. 67.
- P. Ribenboim, The Book of Prime Number Records, 2nd ed., Springer, 1989; p. 225.
Links
- Phil Carmody, a(7), NMBRTHRY November 2001.
- Index entries for sequences related to primes in arithmetic progressions
Crossrefs
Programs
-
PARI
a(n)=my(p=prime(n),P=prod(i=1,n-1,prime(i)),d); forprime(q=p+1,, d=q-p; if(d%P,next); for(i=2,p-1,if(!isprime(p+i*d), next(2))); return(q)) \\ Charles R Greathouse IV, Nov 08 2013
Extensions
a(8) found by Wojciech Izykowski, from Jens Kruse Andersen, Jun 30 2014
Comments