Olympiad Maths Prep

Track / Stage 10 / 26 of 40 #1986 of 2000

Problem 1986

Hardest shortlist tier
Number theory Difficulty 9.3 Prove it USA IMO TST · United States

Let Z/nZ\mathbb{Z}/n\mathbb{Z} denote the set of integers considered modulo nn (hence Z/nZ\mathbb{Z}/n\mathbb{Z} has nn elements). Find all positive integers nn for which there exists a bijective function g:Z/nZZ/nZg: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z}, such that the 101 functions
g(x), g(x)+x, g(x)+2x, , g(x)+100x g(x),\ g(x) + x,\ g(x) + 2x,\ \dots,\ g(x) + 100x
are all bijections on Z/nZ\mathbb{Z}/n\mathbb{Z}.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

First solution (original one) The proof is split into two essentially orthogonal claims, which we state as lemmas.

**Lemma (Lemma I: elimination of gg)**
Assume valiant g:Z/nZZ/nZg: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z} exists. Then
k!xZ/nZxk0(modn) k! \sum_{x \in \mathbb{Z}/n\mathbb{Z}} x^k \equiv 0 \pmod{n}
for k=0,1,,100k = 0, 1, \dots, 100.

*Proof.* Define gx(T)=g(x)+Txg_x(T) = g(x) + Tx for any integer TT. If we view gx(T)kg_x(T)^k as a polynomial in Z[T]\mathbb{Z}[T] of degree kk with leading coefficient xkx^k, then taking the kkth finite difference implies that, for any xx,
k!xk=(k0)gx(k)k(k1)gx(k1)k+(k2)gx(k2)k+(1)k(kk)gx(0)k. k! x^k = \binom{k}{0} g_x(k)^k - \binom{k}{1} g_x(k-1)^k + \binom{k}{2} g_x(k-2)^k - \dots + (-1)^k \binom{k}{k} g_x(0)^k.
On the other hand, for any 1k1001 \le k \le 100 we should have
xgx(0)kxgx(1)kxgx(k)kSk=def0k++(n1)k(modn) \sum_x g_x(0)^k \equiv \sum_x g_x(1)^k \equiv \dots \equiv \sum_x g_x(k)^k \\ \equiv S_k \stackrel{\text{def}}{=} 0^k + \dots + (n-1)^k \pmod{n}
by the hypothesis. Thus we find
k!xxk[(k0)(k1)+(k2)]Sk0(modn) k! \sum_x x^k \equiv \left[ \binom{k}{0} - \binom{k}{1} + \binom{k}{2} - \dots \right] S_k \equiv 0 \pmod{n}
for any 1k1001 \le k \le 100, but also obviously for k=0k = 0. \square

We now prove the following self-contained lemma.

Lemma (Lemma II: power sum calculation)
Let pp be a prime, and let n,Mn, M be positive integers such that
M divides 1k+2k++nk M \text{ divides } 1^k + 2^k + \dots + n^k
for k=0,1,,p1k = 0, 1, \dots, p-1. If pnp \mid n then νp(M)<νp(n)\nu_p(M) < \nu_p(n).

*Proof.* The hypothesis means that any polynomial f(T)Z[T]f(T) \in \mathbb{Z}[T] with degfp1\deg f \le p-1 will have x=1nf(x)0(modM)\sum_{x=1}^n f(x) \equiv 0 \pmod{M}. In particular, we have
0x=1n(x1)(x2)(x(p1))=(p1)!x=1n(x1p1)=(p1)!(np)(modM). \begin{aligned} 0 &\equiv \sum_{x=1}^{n} (x-1)(x-2)\cdots(x-(p-1)) \\ &= (p-1)! \sum_{x=1}^{n} \binom{x-1}{p-1} = (p-1)! \binom{n}{p} \pmod{M}. \end{aligned}
But now νp(M)νp((np))=νp(n)1\nu_p(M) \le \nu_p\left(\binom{n}{p}\right) = \nu_p(n) - 1. \square

Now assume for contradiction that valiant g:Z/nZZ/nZg: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z} exists, and p101p \le 101 is the smallest prime dividing nn. Lemma I implies that k!xxk0(modn)k! \sum_x x^k \equiv 0 \pmod{n} for k=1,,p1k = 1, \dots, p-1 and hence xxk0(modn)\sum_x x^k \equiv 0 \pmod{n} too. Thus M=nM=n holds in the previous lemma, impossible.

A second solution Both lemmas above admit variations where we focus on working modulo pep^e rather than working modulo nn.

Lemma (Lemma I')
Assume valiant g:Z/nZZ/nZg: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z} exists. Let p101p \le 101 be a prime, and e=νp(n)e = \nu_p(n). Then
xZ/nZxk0(modpe) \sum_{x \in \mathbb{Z}/n\mathbb{Z}} x^k \equiv 0 \pmod{p^e}
for k=0,1,,p1k = 0, 1, \dots, p-1.

*Proof.* This is weaker than Lemma I, but we give an independent specialized proof. Begin by writing
x(g(x)+Tx)kxxk(modpe). \sum_x (g(x) + Tx)^k \equiv \sum_x x^k \pmod{p^e}.
Both sides are integer polynomials in TT, which vanish at T=0,1,,p1T = 0, 1, \dots, p-1 by hypothesis (since p1100p-1 \le 100).
We now prove the following more general fact: if f(T)Z[T]f(T) \in \mathbb{Z}[T] is an integer polynomial with degfp1\deg f \le p-1, such that f(0)f(p1)0(modpe)f(0) \equiv \dots \equiv f(p-1) \equiv 0 \pmod{p^e}, then all coefficients of ff are divisible by pep^e. The proof is by induction on e1e \ge 1. When e=1e=1, this is just the assertion that the polynomial has at most degf\deg f roots modulo pp. When e2e \ge 2, we note that the previous result implies all coefficients are divisible by pp, and then we divide all coefficients by pp.
Applied here, we have that all coefficients of
f(T)=defx(g(x)+Tx)kxxk f(T) \stackrel{\text{def}}{=} \sum_x (g(x) + Tx)^k - \sum_x x^k
are divisible by pep^e. The leading TkT^k coefficient is kxk\sum_k x^k as desired. \square

Lemma (Lemma II')
If e1e \ge 1 is an integer, and pp is a prime, then
νp(1p1+2p1++(pe1)p1)=e1. \nu_p (1^{p-1} + 2^{p-1} + \dots + (p^e - 1)^{p-1}) = e - 1.
*Proof.* First, note that the cases where p=2p=2 or e=1e=1 are easy; since if p=2p=2 we have x=02e1x2e1(2e1)2e1(mod2e)\sum_{x=0}^{2^e-1} x \equiv 2^{e-1}(2^e-1) \equiv -2^{e-1} \pmod{2^e}, while if e=1e=1 we have 1p1++(p1)p11(modp)1^{p-1} + \dots + (p-1)^{p-1} \equiv -1 \pmod{p}. Henceforth assume that p>2,e>1p > 2, e > 1.
Let gg be an integer which is a primitive root modulo pep^e. Then, we can sum the terms which are relatively prime to pp as
S0=defgcd(x,p)=1xp1i=1φ(pe)g(p1)igpe1(p1)21gp11(modpe) S_0 \stackrel{\text{def}}{=} \sum_{\text{gcd}(x,p)=1} x^{p-1} \equiv \sum_{i=1}^{\varphi(p^e)} g^{(p-1)\cdot i} \equiv \frac{g^{p^{e-1}(p-1)^2} - 1}{g^{p-1} - 1} \pmod{p^e}
which implies νp(S0)=e1\nu_p(S_0) = e-1, by lifting the exponent. More generally, for r1r \ge 1 we may set
Sr=defνp(x)=rxp1(pr)p1i=1φ(per)gr(p1)i(modpe) S_r \stackrel{\text{def}}{=} \sum_{\nu_p(x)=r} x^{p-1} \equiv (p^r)^{p-1} \sum_{i=1}^{\varphi(p^{e-r})} g_r^{(p-1)\cdot i} \pmod{p^e}
where grg_r is a primitive root modulo perp^{e-r}. Repeating the exponent-lifting calculation shows that νp(Sr)=r(p1)+((er)1)>e\nu_p(S_r) = r(p-1) + ((e-r)-1) > e, as needed. \square

Assume to the contrary that p101p \le 101 is a prime dividing nn and a valiant g:Z/nZZ/nZg: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z} exists. Take k=p1k = p-1 in Lemma I' to contradict Lemma II'

A third remixed solution We use Lemma I and Lemma II' from before. As before, assume g:Z/nZZ/nZg: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z} is valiant, and nn has a prime divisor p101p \le 101. Also, let e=νp(n)e = \nu_p(n).
Then (p1)!xxp10(modn)(p-1)! \sum_{x} x^{p-1} \equiv 0 \pmod{n} by Lemma I, and now
0xxp1(modpe)npex=1pe1xp1≢0(modpe) \begin{aligned} 0 &\equiv \sum_{x} x^{p-1} \pmod{p^e} \\ &\equiv \frac{n}{p^e} \sum_{x=1}^{p^e-1} x^{p-1} \not\equiv 0 \pmod{p^e} \end{aligned}
by Lemma II', contradiction.

A fourth remixed solution We also can combine Lemma I' and Lemma II. As before, assume g:Z/nZZ/nZg: \mathbb{Z}/n\mathbb{Z} \to \mathbb{Z}/n\mathbb{Z} is valiant, and let pp be the smallest prime divisor of nn.
Assume for contradiction p101p \le 101. By Lemma I' we have
xxk0(modpe) \sum_{x} x^k \equiv 0 \pmod{p^e}
for k=0,,p1k=0, \dots, p-1. This directly contradicts Lemma II with M=peM = p^e.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.