Abstract. For a fixed positive integer , we consider the function of n that counts the number of elements of order in Z * n . We show that the average growth rate of this function is C (log n) d( )−1 for an explicitly given constant C , where d( ) is the number of divisors of . From this we conclude that the average growth rate of the number of primitive Dirichlet characters modulo n of order is (We also consider the number of elements of Z n whose th power equals 0, showing that its average growth rate is D (log n) −1 for another explicit constant D . Two techniques for evaluating sums of multiplicative functions, the Wirsing-Odoni and SelbergDelange methods, are illustrated by the proofs of these results.Let Z * n denote the group (under multiplication modulo n) of integers relatively prime to n, and let denote a fixed positive integer. Define a (n) to be the number of solutions of x = 1 in Z * n . The value of a (p), when p is prime, ranges over all divisors of ; however, a (n) can be much larger than if n is composite. It is therefore interesting to ask how the function a (n) behaves on average over n. We can ask the same aboutã (n), which we let denote the number of solutions of x = 1 in Z * n for which x m = 1 for all 1 ≤ m < ; such an x is said to be of order in the group Z * n . In other words, a counts the th roots of unity modulo n, whilẽ a counts the primitive th roots of unity modulo n.The following theorem, which is proved in Section 2, gives the average rate of growth for both functions a andã for every positive integer . In the statement of the theorem, we employ the usual notation p j n to mean that p j | n but p j+1 n; we also use d( ) to denote the number of divisors of .
Theorem 1. For any positive integer and for any real numberas N → ∞. Furthermore, the same asymptotic formula holds for n