login
A359210
Number of m^k == 1 (mod p) for 0 < m,k < p where p is the n-th prime.
0
1, 3, 8, 15, 27, 40, 48, 63, 63, 104, 135, 168, 180, 195, 135, 200, 171, 360, 315, 351, 420, 375, 243, 420, 560, 520, 495, 315, 648, 624, 819, 675, 660, 675, 584, 975, 1000, 891, 495, 680, 531, 1512, 999, 1280, 1064, 1323, 1755, 1095, 675, 1480, 1140, 1287
OFFSET
1,2
COMMENTS
a(n) is the sum of (p-1) / order(m, p) for all m in Zp for the n-th prime.
EXAMPLE
For n=3 the a(3) = 8 numbers with m^k == 1 (mod 5) (the third prime) are (1,1), (1,2), (1,3), (1,4), (2,4), (3,4), (4,2), (4,4).
MATHEMATICA
Table[Sum[(p - 1)/MultiplicativeOrder[m, p], {m, 1, p - 1}], {p, Prime[Range[20]]}]
PROG
(PARI) a(n)= my(p=prime(n)); sum(m=1, p-1, (p-1)/znorder(Mod(m, p)))
(Python)
import sympy
print([sum((p-1) // sympy.ntheory.n_order(m, p) for m in range(1, p)) for p in sympy.primerange(100)])
CROSSREFS
KEYWORD
nonn
AUTHOR
Seth A. Troisi, Dec 20 2022
STATUS
approved