|
|
A114739
|
|
a(1) = 1. Smallest prime == 1 (mod n) if n is composite else least composite number ==1 (mod n).
|
|
0
|
|
|
1, 9, 4, 5, 6, 7, 8, 17, 19, 11, 12, 13, 14, 29, 31, 17, 18, 19, 20, 41, 43, 23, 24, 73, 101, 53, 109, 29, 30, 31, 32, 97, 67, 103, 71, 37, 38, 191, 79, 41, 42, 43, 44, 89, 181, 47, 48, 97, 197, 101, 103, 53, 54, 109, 331, 113, 229, 59, 60, 61
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
PROG
|
(PARI) a(n) = {if (n == 1, return (1)); k = 1; if (! isprime(n), while (! isprime(k*n+1), k++), while (isprime(k*n+1), k++)); k*n+1; } \\ Michel Marcus, Sep 17 2013
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,less
|
|
AUTHOR
|
|
|
EXTENSIONS
|
a(3) corrected and more terms added by Michel Marcus, Sep 17 2013
|
|
STATUS
|
approved
|
|
|
|