login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A204894 Least prime p such that n divides p-q for some prime q<p. 3
3, 5, 5, 7, 7, 11, 17, 11, 11, 13, 13, 17, 29, 17, 17, 19, 19, 23, 41, 23, 23, 29, 53, 29, 53, 29, 29, 31, 31, 37, 67, 37, 71, 37, 37, 41, 79, 41, 41, 43, 43, 47, 89, 47, 47, 53, 97, 53, 101, 53, 53, 59, 109, 59, 113, 59, 59, 61, 61, 67, 127, 67, 131, 67, 67, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
For a guide to related sequences, see A204892.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
n + 2 <= a(n) <= prime(n+1). - Charles R Greathouse IV, Jul 17 2015
MATHEMATICA
(See the program at A204892.)
PROG
(PARI) a(n)=forprime(p=n+2, , forstep(k=p%n, p-1, n, if(isprime(k), return(p)))) \\ Charles R Greathouse IV, Mar 20 2013
(PARI) a(n)=if(isprime(n+2), return(n+2)); my(s=if(n%2, 2*n, n), t); forprime(p=s+3, , t=p%n; forstep(q=if(t%2, t, t+n), p-s, s, if(isprime(q), return(p)))) \\ Charles R Greathouse IV, Jul 17 2015
CROSSREFS
Sequence in context: A302756 A305216 A087821 * A109258 A088081 A206768
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 20 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 04:31 EDT 2024. Contains 371767 sequences. (Running on oeis4.)