Maths Olympiad Prep

Library / Balkan Mathematical Olympiad competition problems /14 of 16

Balkan Mathematical Olympiad competition problems

Algebra Difficulty 7.8 National Olympiad, round 2 Prove it Balkan Mathematical Olympiad

A natural number nn is given. Determine all (n−1)(n-1)-tuples of nonnegative integers a1,a2,…,an−1a_1, a_2, \dots, a_{n-1} such that
[m2n−1]+[2m+a12n−1]+[22m+a22n−1]+[23m+a32n−1]+⋯+[2n−1m+an−12n−1]=m \left[ \frac{m}{2^n - 1} \right] + \left[ \frac{2m + a_1}{2^n - 1} \right] + \left[ \frac{2^2m + a_2}{2^n - 1} \right] + \left[ \frac{2^3m + a_3}{2^n - 1} \right] + \dots + \left[ \frac{2^{n-1}m + a_{n-1}}{2^n - 1} \right] = m
holds for all m∈Zm \in \mathbb{Z}.

Solution

Solution 1. We will show that there is a unique such nn-tuple: ak=2n−1+2k−1−1a_k = 2^{n-1} + 2^{k-1} - 1 for k=1,…,n−1k = 1, \dots, n-1.
Write N=2n−1N = 2^n - 1 and fk(x)=[2kx+akN]f_k(x) = \left[ \frac{2^k x + a_k}{N} \right] for k=0,1,…,n−1k = 0, 1, \dots, n-1, where a0=0a_0 = 0. Since
∑k=0n−1fk(m)−∑k=0n−1fk(m−1)=1, \sum_{k=0}^{n-1} f_k(m) - \sum_{k=0}^{n-1} f_k(m-1) = 1,
for each m∈Zm \in \mathbb{Z}, there is exactly one kk for which fk(m)=fk(m−1)+1f_k(m) = f_k(m-1) + 1. We work modulo NN. The last equality holds if and only if 2km+ak∈{0,1,…,2k−1}2^k m + a_k \in \{0, 1, \dots, 2^k - 1\}. I.e. if and only if
2km∈{−ak,1−ak,…,2k−1−ak}. 2^k m \in \{-a_k, 1-a_k, \dots, 2^k-1-a_k\}.
Multiplying with 2n−k2^{n-k}, and noting that 2n≡1 mod N2^n \equiv 1 \bmod N, we get the following:
For each m∈Zm \in \mathbb{Z} there is a unique k∈{0,1,…,n−1}k \in \{0, 1, \dots, n-1\} such that m∈Bkm \in B_k (modulo NN) where
Bk={bk,bk+2n−k,…,bk+(2k−1)2n−k} B_k = \{b_k, b_k + 2^{n-k}, \dots, b_k + (2^k - 1)2^{n-k}\}
with bk=−2n−kakb_k = -2^{n-k}a_k. Therefore the problem condition is equivalent to ⋃k=0n−1Bk\bigcup_{k=0}^{n-1} B_k being a partition of {0,1,…,N−1}\{0, 1, \dots, N-1\}.
For a number bb and set a A⊆ZA \subseteq \mathbb{Z} we write b+A={b+a:a∈A}b + A = \{b + a : a \in A\}. With this notation, Bn−1=bn−1+{0,2,4,…,2n−2}B_{n-1} = b_{n-1} + \{0, 2, 4, \dots, 2^n - 2\}. The set Bn−2=bn−2+{0,4,8,…,2n−4}B_{n-2} = b_{n-2} + \{0, 4, 8, \dots, 2^n - 4\} is contained in Bn−1‾=bn−1+{1,3,…,2n−3}\overline{B_{n-1}} = b_{n-1} + \{1, 3, \dots, 2^n - 3\}, implying bn−2,bn−2+2n−4∈Bn−1‾b_{n-2}, b_{n-2} + 2^n - 4 \in \overline{B_{n-1}}, which holds only if bn−2≡bn−1+1b_{n-2} \equiv b_{n-1} + 1. Further, the set Bn−3=bn−3+{0,8,16,…,2n−8}B_{n-3} = b_{n-3} + \{0, 8, 16, \dots, 2^n - 8\} is contained in Bn−1‾∪Bn−2‾=bn−1+{3,7,…,2n−5}\overline{B_{n-1}} \cup \overline{B_{n-2}} = b_{n-1} + \{3, 7, \dots, 2^n - 5\}, so we must have bn−3≡bn−1+3b_{n-3} \equiv b_{n-1} + 3. Similarly, bn−4≡bn−1+7b_{n-4} \equiv b_{n-1} + 7 etc. In general, bn−k≡bn−1+2k−1−1b_{n-k} \equiv b_{n-1} + 2^{k-1} - 1 for k=1,…,n−1k = 1, \dots, n-1. It follows that b0≡bn−1+2n−1−1b_0 \equiv b_{n-1} + 2^{n-1} - 1. On the other hand, we have b0=0b_0 = 0, which gives bn−1≡1−2n−1b_{n-1} \equiv 1 - 2^{n-1} and therefore bk≡2n−1−k−2n−1b_k \equiv 2^{n-1-k} - 2^{n-1}. Thus ak≡−2kbk≡2n+k−1−2n−1≡2n−1+2k−1−1a_k \equiv -2^k b_k \equiv 2^{n+k-1} - 2^{n-1} \equiv 2^{n-1} + 2^{k-1} - 1 for k=1,…,n−1k = 1, \dots, n-1.
Finally, ∑kfk(0)=0\sum_k f_k(0) = 0 implies ak<Na_k < N for all kk, so we conclude that ak=2n−1+2k−1−1a_k = 2^{n-1} + 2^{k-1} - 1 for each k=1,2,…,n−1k = 1, 2, \dots, n-1.

Solution 2. We will use the identity
[x]+⌊x+1N⌋+⌊x+2N⌋+⋯+⌊x+N−1N⌋=[Nx] [x] + \left\lfloor x + \frac{1}{N} \right\rfloor + \left\lfloor x + \frac{2}{N} \right\rfloor + \dots + \left\lfloor x + \frac{N-1}{N} \right\rfloor = [Nx]
which holds for every x∈Rx \in \mathbb{R} and every N∈NN \in \mathbb{N}. (One can check this by noting that the difference between the two sides of the identity is periodic with period 1/N1/N and that the identity clearly holds for x∈[0,1N)x \in [0, \frac{1}{N}).)
Writing a0=0a_0 = 0 and N=2n−1N = 2^n - 1 we observe that
m=∑k=0n−1⌊2km+akN⌋=∑r=02k−1∑r=02k−1⌊m+ak2kN+r2k⌋=∑k=0n−1∑r=02k−1⌊m+ak+rN2kN⌋.(1) m = \sum_{k=0}^{n-1} \left\lfloor \frac{2^k m + a_k}{N} \right\rfloor = \sum_{r=0}^{2^k-1} \sum_{r=0}^{2^k-1} \left\lfloor \frac{m + \frac{a_k}{2^k}}{N} + \frac{r}{2^k} \right\rfloor = \sum_{k=0}^{n-1} \sum_{r=0}^{2^k-1} \left\lfloor \frac{m + \frac{a_k + rN}{2^k}}{N} \right\rfloor . \quad (1)
It follows that cr,k=⌈ak+rN2k⌉c_{r,k} = \left\lceil \frac{a_k+rN}{2^k} \right\rceil are all distinct modulo NN for k=0,1,…,n−1k = 0, 1, \dots, n-1 and r=0,1,…,2k−1r = 0, 1, \dots, 2^k - 1. Indeed if two (or more) of them are congruent to tt, then writing f(t)f(t) for the right hand side of (1) we get 1=f(−t)−f(−t−1)≥21 = f(-t) - f(-t-1) \ge 2, a contradiction.
Since N=2n−1N = 2^n - 1, then cr,k=r2n−k+dr,kc_{r,k} = r2^{n-k} + d_{r,k}, where dr,k=⌈ak−r2k⌉d_{r,k} = \left\lceil \frac{a_k-r}{2^k} \right\rceil. Because c0,0=0c_{0,0} = 0, then c0,k≠0c_{0,k} \ne 0 for each k≠0k \ne 0 giving ak≥2ka_k \ge 2^k for each k≥1k \ge 1. Setting m=0m = 0 in the original equation gives ak<Na_k < N for each kk and so d0,k≤2n−k−1d_{0,k} \le 2^{n-k} - 1 for each kk. Furthermore
2n−k−1≥d0,k≥d1,k≥⋯≥d2k−1,k≥d2k,k=d0,k−1≥0.(2) 2^{n-k} - 1 \ge d_{0,k} \ge d_{1,k} \ge \dots \ge d_{2^k-1,k} \ge d_{2^k,k} = d_{0,k} - 1 \ge 0. \quad (2)
In particular 0≤cr,k=r2n−k+dr,k≤(2n−2n−k)+(2n−k−1)=N0 \le c_{r,k} = r2^{n-k} + d_{r,k} \le (2^n - 2^{n-k}) + (2^{n-k} - 1) = N. For k=0,1,2,…,n−1k = 0, 1, 2, \dots, n-1 define Ak={cr,k:r=0,1,…,2k−1}A_k = \{c_{r,k} : r = 0, 1, \dots, 2^k - 1\}. From the above, since A0={0}A_0 = \{0\}, we must have that A1∪A2∪⋯∪An−1={1,2,…,N−1}A_1 \cup A_2 \cup \dots \cup A_{n-1} = \{1, 2, \dots, N-1\}.
For a natural number tt let v2(t)v_2(t) be as usual the largest exponent such that 2v2(t)∣t2^{v_2(t)}|t. Let
f(t)=n−v2(t)−1,g(t)=t−2v2(t)21+v2(t),andh(t)=2f(t)−1−g(t). f(t) = n - v_2(t) - 1, \quad g(t) = \frac{t - 2^{v_2(t)}}{2^{1+v_2(t)}} , \quad \text{and} \quad h(t) = 2^{f(t)} - 1 - g(t).
Note that f(t)f(t) uniquely determines v2(t)v_2(t) and together with g(t)g(t) they uniquely determine tt. Similarly h(t)h(t) and g(t)g(t) uniquely determine tt.
Claim. For each t∈{1,2,…,2n−1−1}t \in \{1, 2, \dots, 2^{n-1} - 1\} we have:
(i) dg(t),f(t)=2v2(t)d_{g(t),f(t)} = 2^{v_2(t)},
(ii) dh(t),f(t)=2v2(t)−1d_{h(t),f(t)} = 2^{v_2(t)} - 1,
(iii) cg(t),f(t)=tc_{g(t),f(t)} = t,
(iv) ch(t),f(t)=N−tc_{h(t),f(t)} = N - t.
Proof of Claim. We proceed by induction on tt. For t=1t = 1 we have v2(1)=0,f(1)=n−1,g(1)=0v_2(1) = 0, f(1) = n-1, g(1) = 0 and h(1)=2n−1−1h(1) = 2^{n-1} - 1. From (2) we have 1≥d0,n−11 \ge d_{0,n-1} and d0,n−1−1≥0d_{0,n-1} - 1 \ge 0 proving (i). Also, cg(1),f(1)=c0,n−1=d0,n−1=1c_{g(1),f(1)} = c_{0,n-1} = d_{0,n-1} = 1 proving (iii). From (2) we have 1≥d2n−1−1,n−1≥01 \ge d_{2^{n-1}-1,n-1} \ge 0. But c2n−1−1,n−1=2n−2+d2n−1−1,n−1=N−1+d2n−1−1,n−1c_{2^{n-1}-1,n-1} = 2^n - 2 + d_{2^{n-1}-1,n-1} = N - 1 + d_{2^{n-1}-1,n-1}. Since c2n−1−1,n−1≤N−1c_{2^{n-1}-1,n-1} \le N-1 we deduce both (ii) and (iv).
Assume now that the result is true for t=s−1t = s - 1. We will prove the result for t=st = s.
Case 1: If s−1=2us - 1 = 2u is even, then v2(s)=0v_2(s) = 0, so f(s)=n−1,g(s)=uf(s) = n-1, g(s) = u and h(s)=2n−1−1−uh(s) = 2^{n-1} - 1 - u.
By the induction hypothesis, since all the cr,kc_{r,k}'s are distinct, we must have
s≤cg(s),f(s)=2u+dg(s),f(s)=s−1+dg(s),f(s) s \le c_{g(s),f(s)} = 2u + d_{g(s),f(s)} = s - 1 + d_{g(s),f(s)}
and
N−s≥ch(s),f(s)=2n−2−2u+dh(s),f(s)=N−s+dh(s),f(s). N - s \ge c_{h(s),f(s)} = 2^n - 2 - 2u + d_{h(s),f(s)} = N - s + d_{h(s),f(s)}.
From the above we must have dg(s),f(s)≥1d_{g(s),f(s)} \ge 1 and dh(s),f(s)≤0d_{h(s),f(s)} \le 0. But from (2) any two dr,kd_{r,k}'s for fixed kk differ by at most 1. This can only be achieved if we have equalities everywhere proving (i)-(iv).
Case 2: If s−1=2u+1s - 1 = 2u + 1 is odd, then we write s=2u+2=2vws = 2u + 2 = 2^v w for some odd ww. Then v2(s)=vv_2(s) = v and so k=f(s)=n−1−vk = f(s) = n - 1 - v and r=g(s)=(w−1)/2r = g(s) = (w - 1)/2. Also h(s)=2k−1−rh(s) = 2^k - 1 - r. By the induction hypothesis we must have
s≤cr,k=r2n−k+dr,k=2v(w−1)+dr,k=s−2v+dr,k s \le c_{r,k} = r2^{n-k} + d_{r,k} = 2^v(w-1) + d_{r,k} = s - 2^v + d_{r,k}
and
N−s≥ch(s),k=(2k−1−r)2n−k+dh(s),k=2n−2v+1−s+2v+dh(s),k=N+1−s−2v+dh(s),k. \begin{align*} N - s \ge c_{h(s),k} &= (2^k - 1 - r)2^{n-k} + d_{h(s),k} \\ &= 2^n - 2^{v+1} - s + 2^v + d_{h(s),k} \\ &= N + 1 - s - 2^v + d_{h(s),k}. \end{align*}
From the above we must have dr,k≥2vd_{r,k} \ge 2^v and dh(s),k≤2v−1d_{h(s),k} \le 2^v - 1. As in Case 1 we must have equalities everywhere proving (i)-(iv). □\square
For t=2n−1−2n−k−1t = 2^{n-1} - 2^{n-k-1} we have v2(t)=n−k−1,f(t)=k,g(t)=2k−1−1v_2(t) = n-k-1, f(t) = k, g(t) = 2^{k-1}-1 and h(t)=2k−1−(2k−1−1)=2k−1h(t) = 2^k - 1 - (2^{k-1}-1) = 2^{k-1}. Thus from (ii) and (iv) we get
[ak−(2k−1−1)2k]=2n−k−1and[ak−2k−12k]=2n−k−1−1. \left[ \frac{a_k - (2^{k-1} - 1)}{2^k} \right] = 2^{n-k-1} \quad \text{and} \quad \left[ \frac{a_k - 2^{k-1}}{2^k} \right] = 2^{n-k-1} - 1.
This is only possible if ak=2k⋅2n−k−1+(2k−1−1)=2n−1+2k−1−1a^k = 2^k \cdot 2^{n-k-1} + (2^{k-1}-1) = 2^{n-1} + 2^{k-1} - 1 as required.

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.