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