Problem

Source:

Tags: number theory proposed, number theory, Hi



$g$ and $n$ are natural numbers such that $gcd(g^2-g,n)=1$ and $A=\{g^i|i \in \mathbb N\}$ and $B=\{x\equiv (n)|x\in A\}$(by $x\equiv (n)$ we mean a number from the set $\{0,1,...,n-1\}$ which is congruent with $x$ modulo $n$). if for $0\le i\le g-1$ $a_i=|[\frac{ni}{g},\frac{n(i+1)}{g})\cap B|$ prove that $g-1|\sum_{i=0}^{g-1}ia_i$.( the symbol $|$ $|$ means the number of elements of the set)($\frac{100}{6}$ points) the exam time was 4 hours