|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|