Maths Olympiad Prep

Library / /88 of 94

Number theory Difficulty 7.1 National Olympiad, round 2 Prove it Hong Kong

Let nn be a positive integer and let aa be an integer with gcd(a,n)=1\text{gcd}(a, n) = 1. Prove that
aφ(n)1nj=1gcd(j,n)=1n1aj[ajn](modn), \frac{a\varphi(n) - 1}{n} \equiv \sum_{\substack{j=1 \\ \text{gcd}(j,n)=1}}^{n} \frac{1}{aj} \left[ \frac{aj}{n} \right] \pmod{n},
where φ(n)\varphi(n) is the Euler's totient function and [x][x] is the greatest integer not exceeding xx.

Solution

For each integer jj relatively prime to nn, let rjr_j be the remainder when ajaj is divided by nn. Then we have
aφ(n)=j=1(j,n)=1najj=j=1(j,n)=1n1j(ajnn+rj)=j=1(j,n)=1nrjj(1+nrjajn)=j=1(j,n)=1n(1+nrjajn) \begin{aligned} a^{\varphi(n)} &= \prod_{\substack{j=1 \\ (j,n)=1}}^{n} \frac{aj}{j} = \prod_{\substack{j=1 \\ (j,n)=1}}^{n} \frac{1}{j} \left( \left\lfloor \frac{aj}{n} \right\rfloor n + r_j \right) \\ &= \prod_{\substack{j=1 \\ (j,n)=1}}^{n} \frac{r_j}{j} \left( 1 + \frac{n}{r_j} \left\lfloor \frac{aj}{n} \right\rfloor \right) = \prod_{\substack{j=1 \\ (j,n)=1}}^{n} \left( 1 + \frac{n}{r_j} \left\lfloor \frac{aj}{n} \right\rfloor \right) \end{aligned}
since {r1,r2,,rφ(n)}\{r_1, r_2, \dots, r_{\varphi(n)}\} is a reduced set of residues modulo nn. Expanding the product and taking modulo n2n^2, we obtain
aφ(n)1+nj=1(j,n)=1n1rjajn1+nj=1(j,n)=1n1ajajn(modn2). a^{\varphi(n)} \equiv 1 + n \sum_{\substack{j=1 \\ (j,n)=1}}^{n} \frac{1}{r_j} \left\lfloor \frac{aj}{n} \right\rfloor \equiv 1 + n \sum_{\substack{j=1 \\ (j,n)=1}}^{n} \frac{1}{aj} \left\lfloor \frac{aj}{n} \right\rfloor \pmod{n^2}.
This implies
aφ(n)1nj=1(j,n)=1n1ajajn(modn). \frac{a^{\varphi(n)} - 1}{n} \equiv \sum_{\substack{j=1 \\ (j,n)=1}}^{n} \frac{1}{aj} \left\lfloor \frac{aj}{n} \right\rfloor \pmod{n}.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.