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!)
A202036 Smallest prime residue of x^n (mod n) for x=0..n-1, or 0 if no such prime exists. 1
0, 0, 2, 0, 2, 3, 2, 0, 0, 5, 2, 0, 2, 2, 2, 0, 2, 0, 2, 5, 7, 3, 2, 0, 7, 3, 0, 0, 2, 19, 2, 0, 2, 2, 2, 0, 2, 5, 5, 0, 2, 7, 2, 5, 17, 2, 2, 0, 19, 0, 2, 13, 2, 0, 11, 0, 7, 5, 2, 0, 2, 2, 0, 0, 2, 3, 2, 13, 2, 11, 2, 0, 2, 3, 7, 5, 2, 13, 2, 0, 0, 2, 2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..16384

Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537

EXAMPLE

a(7) = 2 because k^7 == 0, 1, 2, 3, 4, 5, 6 (mod 7) => 2 is the smallest prime.

MAPLE

for n from 1 to 100 do: W:={}:for k from 0 to n-1 do:z:= irem(k^n, n): if type(z, prime)=true then W:=W union {z}:else fi:od: x:=nops(W): if x<>0 then printf(`%d, `, W[1]): else printf(`%d, `, 0):fi: od:

PROG

(PARI) A202036(n) = { my(z, y=n); for(x=1, n-1, z = lift(Mod(x, n)^n); if(isprime(z), y = min(z, y))); if(y==n, 0, y); }; \\ - Antti Karttunen, May 19 2021

CROSSREFS

Cf. A195812, A196082, A202034, A202035.

Sequence in context: A062244 A169979 A079957 * A246752 A246650 A264940

Adjacent sequences: A202033 A202034 A202035 * A202037 A202038 A202039

KEYWORD

nonn

AUTHOR

Michel Lagneau, Dec 09 2011

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 January 29 01:41 EST 2023. Contains 359905 sequences. (Running on oeis4.)