Prove that when n≡1(modk), for any χmodk we have χ(n)=1, so the left side of equation (37) is the number of characters modulo k. By Theorem 5, this number is φ(k). This proves the first part of equation (37).
When n≡1(modk), we must have k>1. If (n,k)>1, then the second part of equation (37) is clearly true. If (n,k)=1, by equation (33) we know that
there must be an h(−1⩽h⩽s) such that 0<γ(h)(n)<ch, hence
0⩽Sh<ch∑e2πihγ(h)(n)/ch=0.
From the above two equations, we can deduce that the second part of equation (37) also holds in this case. Proof complete.
∑χmodkχ(n)=∑0<l−1<c−1⋯∑0≤ls<cs∏j=−1se2πijγ(j)(n)/cj={∑0≤l1<c−1e2πil−1γ(−1)(n)/c−1}⋯{∑0≤ls<cse2πillγ(0)(n)/cs}.