DR.WANG Mathematics中文

2012 USAJMO · Question 5

Number theory · optimization

Problem outline

Write [x]N[x]_N for the least nonnegative residue of xx modulo N=2012N=2012. Choose distinct a,ba,b in {1,…,2011}\{1,\ldots,2011\}. What is the smallest possible number of indices 1≤k≤20111\le k\le2011 for which [ak]N>[bk]N[ak]_N>[bk]_N?

Show answer and methods 1 methods

Answer

The minimum is 502502, attained for example at (a,b)=(4,1010)(a,b)=(4,1010).

Method 1 Pair opposite invertible residues

Factor 2012=4⋅5032012=4\cdot503, with 503503 prime (trial division by the primes up to 2222 suffices). Among 1,…,20111,\ldots,2011 there are 10061006 odd numbers. Removing 503503 and 15091509 leaves exactly 10041004 numbers coprime to 20122012.

If kk is coprime to NN, multiplication by kk preserves distinctness and nonzeroness modulo NN. Thus [ak]N[ak]_N and [bk]N[bk]_N are distinct positive residues. At N−kN-k they become N−[ak]NN-[ak]_N and N−[bk]NN-[bk]_N, which reverses the comparison. These coprime indices form 502502 disjoint pairs since the only possible fixed index would be 10061006, which is even. Every pair contributes exactly one strict win, irrespective of a,ba,b.

Choose a=4a=4 and b=1010b=1010. For even kk, bk−ak=1006kbk-ak=1006k is a multiple of 20122012, so the residues tie. The only remaining noncoprime indices are k=503,1509k=503,1509, for which [4k]N=0[4k]_N=0, so neither is a win. All wins have therefore already been counted in the 502502 pairs.

Source and attribution

The outline and worked methods on this page were prepared for DR.WANG Mathematics.

Original question (external)