login
A365099
Number of distinct residues of x^n (mod n^2), x=0..n^2-1.
5
1, 2, 3, 2, 5, 4, 7, 3, 7, 6, 11, 4, 13, 8, 15, 5, 17, 8, 19, 4, 9, 12, 23, 6, 21, 14, 19, 8, 29, 12, 31, 9, 33, 18, 35, 8, 37, 20, 15, 6, 41, 8, 43, 12, 35, 24, 47, 10, 43, 22, 51, 8, 53, 20, 15, 12, 21, 30, 59, 8, 61, 32, 21, 17, 65, 24, 67, 10, 69, 24, 71, 12, 73, 38, 63
OFFSET
1,2
PROG
(PARI) a(n) = #Set(vector(n^2, x, Mod(x-1, n^2)^n)); \\ Michel Marcus, Aug 22 2023
(Python)
def A365099(n): return len({pow(x, n, n**2) for x in range(n**2)}) # Chai Wah Wu, Aug 22 2023
KEYWORD
nonn
AUTHOR
Albert Mukovskiy, Aug 21 2023
STATUS
approved