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!)
A096385 a(n) = smallest prime p with p^n mod n = 1. 1
3, 7, 3, 11, 5, 29, 3, 7, 11, 23, 5, 53, 13, 31, 3, 103, 5, 191, 3, 37, 23, 47, 5, 11, 53, 7, 13, 59, 11, 311, 3, 67, 67, 71, 5, 149, 37, 61, 3, 83, 5, 173, 23, 31, 47, 283, 5, 29, 11, 103, 5, 107, 5, 31, 13, 7, 59, 709, 7, 367, 61, 37, 3, 131, 23, 269, 13, 139, 29, 569 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
EXAMPLE
n=5: 2^5=32=5*6+2, 3^5=243=5*48+3, 5^5 mod 5 = 0, 7^5=16807=5*3361+2, 11^5=161051=5*32210+1: a(5)=11.
MATHEMATICA
With[{prs=Prime[Range[200]]}, Table[SelectFirst[prs, PowerMod[#, n, n]==1&], {n, 2, 80}]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Aug 31 2015 *)
PROG
(PARI) a(n) = my(p=2); while (Mod(p, n)^n !=1, p=nextprime(p+1)); p; \\ Michel Marcus, Feb 07 2021
CROSSREFS
Sequence in context: A005596 A159566 A316255 * A205723 A088837 A201385
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 05 2004
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 08:39 EDT 2024. Contains 371782 sequences. (Running on oeis4.)