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!)
A242961 The smallest prime p > prime(n) such that p mod prime(n) == - 1. 1
3, 5, 19, 13, 43, 103, 67, 37, 137, 173, 61, 73, 163, 257, 281, 211, 353, 487, 401, 283, 1021, 157, 331, 1423, 193, 1009, 617, 641, 653, 677, 761, 523, 547, 277, 1489, 1811, 313, 977, 1669, 691, 1789, 1447, 4201, 1543, 787, 397, 421, 1783, 907, 457, 3727 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
If the condition a(n) > prime(n) is removed, then we get sequence A032448. This differs only at n = 2 since if p <= prime(n) and p == -1 (mod prime(n)), then p must be prime(n) - 1. The only solution is p = 2, prime(n) = 3. - Michael B. Porter, Jul 01 2014 and Michel Marcus, May 28 2014
LINKS
FORMULA
a(n) = min(p: p mod prime(n) == - 1 and p > prime(n)).
EXAMPLE
a(1) = 3, because for the first prime, 2, we have 3 mod 2 = 2 - 1.
a(2) = 5, because for the second prime, 3, we have 5 mod 3 = 3 - 1.
a(3) = 19, because for the third prime, 5, we have 19 mod 5 = 5 - 1.
PROG
(PARI) a(n) = {q = prime(n); forprime(p=q, , if (p % q == q - 1, return (p); ); ); } \\ Michel Marcus, May 28 2014
CROSSREFS
Cf. A032448.
Sequence in context: A272092 A272019 A270723 * A025046 A305700 A299073
KEYWORD
nonn
AUTHOR
Torlach Rush, May 27 2014
EXTENSIONS
More terms from Michel Marcus, May 28 2014
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 19 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)