6. Proof: Let 1<a2<⋯<aφ(m) be all positive integers not greater than m and coprime with m. Since b1,b2,⋯,bp(m) is a reduced residue system modulo m, and (a,m)=1, by Lemma 13, we know that ab1,ab2,⋯,abq(m) is also a reduced residue system modulo m. And abi≡ri(modm),0⩽ri<m, so r1,r2,⋯,rq(m) and 1,a2,⋯,aq(m) may only differ in order.
Therefore,
r1+r2+⋯+rq(m)=1+a2+⋯+aϕ(m)
By the result of Question 5,
1+a2+⋯+aφ(m)=21m⋅φ(m)
So,
m1(r1+r2+⋯+rφ(m))=m1(1+a2+⋯+aφ(m))=21φ(m)