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!)
A038700 Smallest prime == -1 (mod n). 17
2, 3, 2, 3, 19, 5, 13, 7, 17, 19, 43, 11, 103, 13, 29, 31, 67, 17, 37, 19, 41, 43, 137, 23, 149, 103, 53, 83, 173, 29, 61, 31, 131, 67, 139, 71, 73, 37, 233, 79, 163, 41, 257, 43, 89, 137, 281, 47, 97, 149, 101, 103, 211, 53, 109, 167, 113, 173, 353, 59, 487, 61, 251 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
f[n_] := Block[{k = n - 1}, While[ !PrimeQ@k, k += n]; k]; Array[f, 63] (* Robert G. Wilson v, Jun 09 2009 *)
With[{prs=Prime[Range[100]]}, Table[SelectFirst[prs, Mod[#, n]==n-1&], {n, 70}]] (* Harvey P. Dale, Apr 26 2023 *)
PROG
(PARI)
N=10^8; default(primelimit, N);
a(n)=forprime(p=2, 10^7, if(p%n==n-1, return(p)));
/* Joerg Arndt, Apr 16 2013 */
(PARI) a(n)=my(j); while(!isprime(j++*n-1), ); j*n-1 \\ Charles R Greathouse IV, Apr 18 2013
CROSSREFS
Cf. A034694.
Sequence in context: A138781 A224416 A282049 * A177799 A125767 A326991
KEYWORD
nonn,easy
AUTHOR
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 March 19 02:58 EDT 2024. Contains 370952 sequences. (Running on oeis4.)