Maths Olympiad Prep

Library /

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

Consider an integer n2n \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 pn1p^{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+1pn1\sum_{k=1}^N a_k a_{k+1} \equiv p^{n-1}.

Let m=pn11m = p^{n-1}-1, so N=pn1(p1)=(m+1)(p1)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/(p1)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=(p1)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,,p11, 2, \dots, p-1. Thus, uk=u(p1)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,,N11, 2, \dots, N-1, notice that uk+1uk=1u_{k+1} - u_k = 1, unless kk is divisible by p1p-1, in which case uk+1uk=2u_{k+1} - u_k = 2. Setting uN+1=u1u_{N+1} = u_1, it is readily checked that uN+1uN=2pn2u_{N+1} - u_N = 2 - p^n \equiv 2, so uk+1uk2u_{k+1} - u_k \equiv 2 for all kk divisible by p1p-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 akuk1a_k u_k \equiv 1, we show that the aka_k form the desired permutation of UU.

To begin with, notice that akak+1akak+1a_k a_{k+1} \equiv a_k - a_{k+1}, unless kk is divisible by p1p-1, in which case akak+112(akak+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 (akak+1)ukuk+1uk+1uk1 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=0mi=1p1a(p1)j+ia(p1)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=1p1a(p1)j+ia(p1)j+i+1=i=1p2a(p1)j+ia(p1)j+i+1+a(p1)j(j+1)a(p1)(j+1)+1=i=1p2(a(p1)j+ia(p1)j+i+1)+12(a(p1)j(j+1)a(p1)(j+1)+1)=a(p1)j+1a(p1)(j+1)+12(a(p1)j(j+1)a(p1)(j+1)+1)=a(p1)j+112a(p1)j(j+1)12a(p1)(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
Sj=0ma(p1)j+112j=0ma(p1)(j+1)12j=0ma(p1)(j+1)+1(a1+j=1ma(p1)j+1)12j=1m+1a(p1)j12(j=1ma(p1)j+1+aN+1)12j=1m+1a(p1)j+112j=1m+1a(p1)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(p1)j+1=pj+1u_{(p-1)j+1} = pj + 1, the a(p1)j+1a_{(p-1)j+1} form a permutation of the pj+1pj + 1, therefore j=1m+1a(p1)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(p1)j=pj1u_{(p-1)j} = pj - 1, so the a(p1)j+1a_{(p-1)j+1} form a permutation of the pj1pj - 1, and hence j=1m+1a(p1)j=j=1m+1(pj1)\sum_{j=1}^{m+1} a_{(p-1)j} = \sum_{j=1}^{m+1} (pj - 1). Consequently,
S12j=1m+1((pj+1)(pj1))m+1pn1, 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,000 problems in a working order, from AMC 10 level to the IMO shortlist.

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