login
A365102
Number of distinct residues of x^n (mod n^5), x=0..n^5-1.
5
1, 7, 57, 70, 501, 140, 2059, 1029, 4377, 1255, 13311, 1820, 26365, 5150, 27555, 16386, 78609, 10940, 123463, 8190, 37785, 33280, 267675, 28700, 312501, 65915, 354295, 66950, 682893, 35140, 893731, 262145, 732105, 196525, 1031559, 142220, 1823509, 308660
OFFSET
1,2
MATHEMATICA
a[n_]:=CountDistinct[Table[PowerMod[x-1, n, n^5], {x, 0, n^5-1}]]; Array[a, 38] (* Stefano Spezia, Aug 24 2023 *)
PROG
(PARI) a(n) = #Set(vector(n^5, x, Mod(x-1, n^5)^n));
(Python)
def A365102(n): return len({pow(x, n, n**5) for x in range(n**5)}) # Chai Wah Wu, Aug 23 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Albert Mukovskiy, Aug 22 2023
STATUS
approved