A085313 Number of distinct 10th power residues modulo n.
1, 2, 2, 2, 3, 4, 4, 2, 4, 6, 2, 4, 7, 8, 6, 3, 9, 8, 10, 6, 8, 4, 12, 4, 3, 14, 10, 8, 15, 12, 4, 5, 4, 18, 12, 8, 19, 20, 14, 6, 5, 16, 22, 4, 12, 24, 24, 6, 22, 6, 18, 14, 27, 20, 6, 8, 20, 30, 30, 12, 7, 8, 16, 9, 21, 8, 34, 18, 24, 24, 8, 8, 37, 38, 6, 20, 8, 28, 40, 9, 28, 10, 42, 16
Offset: 1
Links
- T. D. Noe, Table of n, a(n) for n = 1..1000
- S. Li, On the number of elements with maximal order in the multiplicative group modulo n, Acta Arithm. 86 (2) (1998) 113, see proof of theorem 2.1
Crossrefs
Programs
-
Maple
A085313 := proc(m) {seq( modp(b^10,m),b=0..m-1) }; nops(%) ; end proc: seq(A085313(m),m=1..100) ; # R. J. Mathar, Sep 22 2017
-
Mathematica
a[n_] := Table[PowerMod[i, 10, n], {i, 0, n - 1}] // Union // Length; Array[a, 100] (* Jean-François Alcover, Mar 25 2020 *)
-
PARI
a(n)=my(f=factor(n)); prod(i=1, #f[, 1], my(k=f[i, 1]^f[i, 2]); #vecsort(vector(k, i, i^10%k), , 8)) \\ Charles R Greathouse IV, Sep 05 2013
Comments