The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A195743 Number of distinct residues of prime(k)^n (mod n), prime(k) <= n. 1
 0, 1, 2, 2, 3, 3, 4, 2, 3, 3, 5, 3, 6, 5, 6, 2, 7, 3, 8, 3, 5, 6, 9, 3, 5, 7, 3, 5, 10, 5, 11, 2, 11, 8, 11, 3, 12, 11, 8, 3, 13, 4, 14, 7, 10, 11, 15, 3, 7, 4, 15, 5, 16, 3, 9, 5, 11, 13, 17, 4, 18, 16, 6, 2, 18, 8, 19, 6, 19, 9, 20, 3, 21, 17, 10, 11, 21, 5 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS If n = prime(k), then a(n) = k. LINKS Alois P. Heinz, Table of n, a(n) for n = 1..10000 I. M. Vinogradov, On a general theorem concerning the distribution of the residues and non-residues of powers, Trans. American Math. Soc., 29 (1927), 209-217. EXAMPLE a(11) = a(prime(5)) = 5, and we check:  2^11, 3^11, 5^11, 7^11, 11^11 == 2, 3, 5, 7, 0 (mod 11) respectively => 5 distinct residues; a(18) = 3 because 2^18, 3^18, 5^18, 7^18, 11^18, 13^18, 17^18 == 10, 9, 1, 1, 1, 1, 1 (mod 18) respectively => 3 distinct residues. MAPLE a:= proc(n) local p, s; s:= {}; p:=2; while p<=n do s:= s union {p&^n mod n}; p:= nextprime(p) od; nops(s) end: seq(a(n), n=1..100); MATHEMATICA a[n_] := PowerMod[#, n, n]& /@ Prime[Range[PrimePi[n]]] // Union // Length; Array[a, 100] (* Jean-François Alcover, Nov 20 2020 *) PROG (PARI) a(n) = #Set(vector(primepi(n), k, Mod(prime(k), n)^n)); \\ Michel Marcus, Nov 20 2020 CROSSREFS Cf. A195637. Sequence in context: A261018 A339970 A106486 * A106494 A339811 A015135 Adjacent sequences:  A195740 A195741 A195742 * A195744 A195745 A195746 KEYWORD nonn AUTHOR Michel Lagneau, Sep 23 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 20 08:12 EST 2021. Contains 340301 sequences. (Running on oeis4.)