Maths Olympiad Prep

Library / BMO Short List /5 of 5

BMO Short List

Number theory Difficulty 7.8 National Olympiad, round 2 Prove it Balkan Mathematical Olympiad

Consider an integer n≥2n \ge 2 and an odd prime pp. Let UU be the set of all positive integers (strictly) less than pnp^n that are not divisible by pp, and let NN be the number of elements of UU. Does there exist a permutation a1,a2,…,aNa_1, a_2, \dots, a_N of the numbers in UU such that the sum ∑k=1Nakak+1\sum_{k=1}^N a_k a_{k+1}, where aN+1=a1a_{N+1} = a_1, be divisible by pn−1p^{n-1}, but not by pnp^n?

Alexander Ivanov, Bulgaria

Solution

The answer is in the affirmative. Letting ≡\equiv denote congruence modulo pnp^n throughout the argument, we will show that there exists a permutation a1,a2,…,aNa_1, a_2, \dots, a_N of the numbers in UU such that ∑k=1Nakak+1≡pn−1\sum_{k=1}^N a_k a_{k+1} \equiv p^{n-1}.

Let m=pn−1−1m = p^{n-1}-1, so N=pn−1(p−1)=(m+1)(p−1)N = p^{n-1}(p-1) = (m+1)(p-1), and write U={u1,u2,…,uN}U = \{u_1, u_2, \dots, u_N\}, where uk=k+⌊k/(p−1)⌋u_k = k+\lfloor k/(p-1) \rfloor, k=1,2,…,Nk = 1, 2, \dots, N, and ⌊t⌋\lfloor t \rfloor denotes the largest integer (strictly) less than the real number tt.

That the uku_k are pairwise distinct and they all lie in UU follows from the fact that every kk in the range 1,2,…,N1, 2, \dots, N is uniquely expressible in the form k=(p−1)j+ik = (p-1)j + i for some jj in the range 0,1,…,m0, 1, \dots, m and some ii in the range 1,2,…,p−11, 2, \dots, p-1. Thus, uk=u(p−1)j+i=pj+iu_k = u_{(p-1)j+i} = pj + i, so the uku_k are indeed pairwise distinct and they all lie in UU.

For kk in the range 1,2,…,N−11, 2, \dots, N-1, notice that uk+1−uk=1u_{k+1} - u_k = 1, unless kk is divisible by p−1p-1, in which case uk+1−uk=2u_{k+1} - u_k = 2. Setting uN+1=u1u_{N+1} = u_1, it is readily checked that uN+1−uN=2−pn≡2u_{N+1} - u_N = 2 - p^n \equiv 2, so uk+1−uk≡2u_{k+1} - u_k \equiv 2 for all kk divisible by p−1p-1.

Letting now aka_k be the multiplicative inverse of uku_k modulo pnp^n, i.e., aka_k is the unique member of UU satisfying akuk≡1a_k u_k \equiv 1, we show that the aka_k form the desired permutation of UU.

To begin with, notice that akak+1≡ak−ak+1a_k a_{k+1} \equiv a_k - a_{k+1}, unless kk is divisible by p−1p-1, in which case akak+1≡12(ak−ak+1)a_k a_{k+1} \equiv \frac{1}{2}(a_k - a_{k+1}). This is easily established by multiplying both sides of each congruence by ukuk+1u_k u_{k+1}, and noticing that (ak−ak+1)ukuk+1≡uk+1−uk≡1 or 2(a_k - a_{k+1})u_k u_{k+1} \equiv u_{k+1} - u_k \equiv 1 \text{ or } 2.

We are now in a position to evaluate the sum S=∑k=1Nakak+1S = \sum_{k=1}^N a_k a_{k+1} modulo pnp^n. Write
S=∑k=1Nakak+1=∑j=0m∑i=1p−1a(p−1)j+ia(p−1)j+i+1, S = \sum_{k=1}^{N} a_k a_{k+1} = \sum_{j=0}^{m} \sum_{i=1}^{p-1} a_{(p-1)j+i} a_{(p-1)j+i+1},
and consider the inner sum for a fixed jj in the range 0,1,…,m0, 1, \dots, m:
∑i=1p−1a(p−1)j+ia(p−1)j+i+1=∑i=1p−2a(p−1)j+ia(p−1)j+i+1+a(p−1)j(j+1)a(p−1)(j+1)+1=∑i=1p−2(a(p−1)j+i−a(p−1)j+i+1)+12(a(p−1)j(j+1)−a(p−1)(j+1)+1)=a(p−1)j+1−a(p−1)(j+1)+12(a(p−1)j(j+1)−a(p−1)(j+1)+1)=a(p−1)j+1−12a(p−1)j(j+1)−12a(p−1)(j+1)+1. \begin{align*} \sum_{i=1}^{p-1} a_{(p-1)j+i} a_{(p-1)j+i+1} &= \sum_{i=1}^{p-2} a_{(p-1)j+i} a_{(p-1)j+i+1} + a_{(p-1)j(j+1)} a_{(p-1)(j+1)+1} \\ &= \sum_{i=1}^{p-2} (a_{(p-1)j+i} - a_{(p-1)j+i+1}) + \frac{1}{2} (a_{(p-1)j(j+1)} - a_{(p-1)(j+1)+1}) \\ &= a_{(p-1)j+1} - a_{(p-1)(j+1)} + \frac{1}{2} (a_{(p-1)j(j+1)} - a_{(p-1)(j+1)+1}) \\ &= a_{(p-1)j+1} - \frac{1}{2} a_{(p-1)j(j+1)} - \frac{1}{2} a_{(p-1)(j+1)+1}. \end{align*}

Hence
S≡∑j=0ma(p−1)j+1−12∑j=0ma(p−1)(j+1)−12∑j=0ma(p−1)(j+1)+1≡(a1+∑j=1ma(p−1)j+1)−12∑j=1m+1a(p−1)j−12(∑j=1ma(p−1)j+1+aN+1)≡12∑j=1m+1a(p−1)j+1−12∑j=1m+1a(p−1)j. \begin{align*} S &\equiv \sum_{j=0}^{m} a_{(p-1)j+1} - \frac{1}{2} \sum_{j=0}^{m} a_{(p-1)(j+1)} - \frac{1}{2} \sum_{j=0}^{m} a_{(p-1)(j+1)+1} \\ &\equiv \left( a_1 + \sum_{j=1}^{m} a_{(p-1)j+1} \right) - \frac{1}{2} \sum_{j=1}^{m+1} a_{(p-1)j} - \frac{1}{2} \left( \sum_{j=1}^{m} a_{(p-1)j+1} + a_{N+1} \right) \\ &\equiv \frac{1}{2} \sum_{j=1}^{m+1} a_{(p-1)j+1} - \frac{1}{2} \sum_{j=1}^{m+1} a_{(p-1)j}. \end{align*}
Since u(p−1)j+1=pj+1u_{(p-1)j+1} = pj + 1, the a(p−1)j+1a_{(p-1)j+1} form a permutation of the pj+1pj + 1, therefore ∑j=1m+1a(p−1)j+1=∑j=1m+1(pj+1)\sum_{j=1}^{m+1} a_{(p-1)j+1} = \sum_{j=1}^{m+1} (pj + 1). Similarly, u(p−1)j=pj−1u_{(p-1)j} = pj - 1, so the a(p−1)j+1a_{(p-1)j+1} form a permutation of the pj−1pj - 1, and hence ∑j=1m+1a(p−1)j=∑j=1m+1(pj−1)\sum_{j=1}^{m+1} a_{(p-1)j} = \sum_{j=1}^{m+1} (pj - 1). Consequently,
S≡12∑j=1m+1((pj+1)−(pj−1))≡m+1≡pn−1, S \equiv \frac{1}{2} \sum_{j=1}^{m+1} ((pj + 1) - (pj - 1)) \equiv m + 1 \equiv p^{n-1},
as stated in the first paragraph. This completes the solution.

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

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