OFFSET
1,3
COMMENTS
The size of the set of numbers j^5 mod n, gcd(j,n)=1, 1 <= j <= n.
A000010(n) / a(n) is another multiplicative integer sequence.
LINKS
R. J. Mathar, Table of n, a(n) for n = 1..7548
R. J. Mathar, Size of the set of residues of integer powers of fixed exponent, 2017.
Samer Seraj, Counting general power residues, Not. Numb. Th. Discr. Math. 28 (4) (2022) 730-743.
Samer Seraj, Resolution of Mathar's conjectures on counting power residues, INTEGERS 23 (2023) #A62.
FORMULA
Conjecture: a(2^e) = 1 for e <= 1; a(2^e) = 2^(e-1) for e >= 1; a(5)=4; a(5^e) = 4*5^(e-2) for e > 1; a(p^e) = (p-1)*p^(e-1) for p == {2,3,4} (mod 5); a(p^e) = (p-1)*p^(e-1)/5 for p == 1 (mod 5). - R. J. Mathar, Oct 13 2017
a(n) = A000010(n)/A319099(n). This implies that the conjecture above is true. - Jianing Song, Nov 10 2019
MAPLE
MATHEMATICA
a[n_] := Module[{r, j}, r = {}; For[j = 1, j <= n, j++, If[GCD[j, n] == 1, r = r ~Union~ {PowerMod[j, 5, n]}] ]; Length[r]];
Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Feb 14 2023, after R. J. Mathar *)
f[p_, e_] := (p - 1)*p^(e - 1)/If[Mod[p, 5] == 1, 5, 1]; f[2, e_] := 2^(e - 1); f[2, 1] = 1; f[5, e_] := 4*5^(e-2); f[5, 1] = 4; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 10 2023 *)
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
R. J. Mathar, Oct 10 2017
STATUS
approved