Maths Olympiad Prep

Library / Saudi Arabian Mathematical Competitions /373 of 395

Saudi Arabian Mathematical Competitions, 2015

Number theory Difficulty 7.1 National Olympiad, round 2 Prove it Saudi Arabia

For each positive integer nn, define s(n)=∑k=0nrks(n) = \sum_{k=0}^{n} r_{k}, where rkr_{k} is the remainder when (nk)\binom{n}{k} is divided by 33. Find all positive integers nn such that s(n)≥ns(n) \geq n.

Solution

Let 0≤k≤n0 \leq k \leq n be two integers written in base 33 as
n=(3)nmnm−1⋯n1n0‾,k=(3)kmkm−1⋯k1k0‾ n = ^{(3)} \overline{n_{m} n_{m-1} \cdots n_{1} n_{0}}, \quad k = ^{(3)} \overline{k_{m} k_{m-1} \cdots k_{1} k_{0}}
such that nm≠0n_{m} \neq 0. We know from Lucas's theorem that
rk≡(nk)≡∏i=0m(niki)( mod 3) r_{k} \equiv \binom{n}{k} \equiv \prod_{i=0}^{m} \binom{n_{i}}{k_{i}} \quad (\bmod 3)
If there exists 0≤i≤m0 \leq i \leq m such that ki>nik_{i} > n_{i} then (niki)=0\binom{n_{i}}{k_{i}} = 0 and therefore rk=0r_{k} = 0. Therefore, from now on we will restrict to 0≤k≤n0 \leq k \leq n with ki≤nik_{i} \leq n_{i} for all 0≤i≤m0 \leq i \leq m.
Let 0≤i≤m0 \leq i \leq m. If ni=0n_{i} = 0 then ki=0k_{i} = 0. If ni=1n_{i} = 1 then ki∈{0,1}k_{i} \in \{0, 1\}. In all these cases (niki)=1\binom{n_{i}}{k_{i}} = 1. If ni=2n_{i} = 2 then ki∈{0,1,2}k_{i} \in \{0, 1, 2\} and (niki)=1\binom{n_{i}}{k_{i}} = 1 if ki≠1k_{i} \neq 1 and (niki)=2\binom{n_{i}}{k_{i}} = 2 if ki=1k_{i} = 1. Therefore, if the number aa of pairs (ni,ki)=(2,1)(n_{i}, k_{i}) = (2, 1), when 0≤i≤m0 \leq i \leq m, is odd then (nk)≡2a≡2(mod3)\binom{n}{k} \equiv 2^{a} \equiv 2 \pmod{3}, otherwise (nk)≡1(mod3)\binom{n}{k} \equiv 1 \pmod{3}. We deduce that
s(n)=2A(n)+B(n), s(n) = 2A(n) + B(n),
where A(n)A(n) is the number of pairs of integers (n,k)(n, k) such that 0≤ki≤ni0 \leq k_{i} \leq n_{i} for all 0≤i≤m0 \leq i \leq m and the number of pairs (ni,ki)=(2,1)(n_{i}, k_{i}) = (2, 1), when 0≤i≤m0 \leq i \leq m, is odd, while B(n)B(n) is the number of pairs of integers (n,k)(n, k) such that 0≤ki≤ni0 \leq k_{i} \leq n_{i} for all 0≤i≤m0 \leq i \leq m and the number of pairs (ni,ki)=(2,1)(n_{i}, k_{i}) = (2, 1), when 0≤i≤m0 \leq i \leq m, is even.
Denote by rr the number of 00's in n0,n1,n2,…,nmn_{0}, n_{1}, n_{2}, \ldots, n_{m}, by ss the number of 11's and by tt the number of 22's. We have
A(n)=2s((t1)2t−1+(t3)2t−3+(t5)2t−5+⋯ ) A(n) = 2^{s} \left( \binom{t}{1} 2^{t-1} + \binom{t}{3} 2^{t-3} + \binom{t}{5} 2^{t-5} + \cdots \right)
and
B(n)=2s((t0)2t+(t2)2t−2+(t4)2t−4+⋯ ). B(n) = 2^{s} \left( \binom{t}{0} 2^{t} + \binom{t}{2} 2^{t-2} + \binom{t}{4} 2^{t-4} + \cdots \right).
We deduce that
s(n)=2s(((t0)+(t1))2t+((t2)+(t3))2t−2+⋯ )=2s((t+11)2t+(t+13)2t−2+⋯ )=2s⋅(2+1)t+1−(2−1)t+12=2s−1(3t+1−1). \begin{aligned} s(n) & = 2^{s} \left( (\binom{t}{0} + \binom{t}{1}) 2^{t} + (\binom{t}{2} + \binom{t}{3}) 2^{t-2} + \cdots \right) \\ & = 2^{s} \left( \binom{t+1}{1} 2^{t} + \binom{t+1}{3} 2^{t-2} + \cdots \right) \\ & = 2^{s} \cdot \frac{(2+1)^{t+1} - (2-1)^{t+1}}{2} = 2^{s-1} (3^{t+1} - 1). \end{aligned}

a. If the first digit on the left of nn is 22 then
n≥200⋯0⏟r11⋯1⏟s22⋯2⏟t−1‾=2⋅3r+s+t−1+3s−12⋅3t−1+2⋅3t−1−12=4⋅3r+s+3s+12⋅3t−1−1 \begin{aligned} n \geq \overline{2 \underbrace{00 \cdots 0}_{r} \underbrace{11 \cdots 1}_{s} \underbrace{22 \cdots 2}_{t-1}} & = 2 \cdot 3^{r+s+t-1} + \frac{3^{s} - 1}{2} \cdot 3^{t-1} + 2 \cdot \frac{3^{t-1} - 1}{2} \\ & = \frac{4 \cdot 3^{r+s} + 3^{s} + 1}{2} \cdot 3^{t-1} - 1 \end{aligned}
Therefore
n−s(n)≥(4⋅3r+1)⋅3s−9⋅2s+12⋅3t−1−1+2s−1. n - s(n) \geq \frac{(4 \cdot 3^{r} + 1) \cdot 3^{s} - 9 \cdot 2^{s} + 1}{2} \cdot 3^{t-1} - 1 + 2^{s-1}.
- If r≥1r \geq 1 then n−s(n)≥13−9+12⋅13−1+12>0n - s(n) \geq \frac{13 - 9 + 1}{2} \cdot \frac{1}{3} - 1 + \frac{1}{2} > 0
- If r=0r = 0 and s≥2s \geq 2 then
n−s(n)≥45⋅3s−2−36⋅2s−2+12⋅3t−1−1+2>0. n - s(n) \geq \frac{45 \cdot 3^{s-2} - 36 \cdot 2^{s-2} + 1}{2} \cdot 3^{t-1} - 1 + 2 > 0.
- If r=0r = 0 and s=1s = 1 then n≤22⋯21‾t=3t+1−2<3t+1−1=s(n)n \leq \overline{22 \cdots 2 1}_{t} = 3^{t+1} - 2 < 3^{t+1} - 1 = s(n).
- If r=s=0r = s = 0 then n=22⋯2‾t=3t−1<3t+1−12=s(n)n = \overline{22 \cdots 2}_{t} = 3^{t} - 1 < \frac{3^{t+1} - 1}{2} = s(n).

b. If the first digit on the left of nn is 11 then s≥1s \geq 1 and
n≥100⋯0⏟r11⋯1⏟s−122⋯2⏟t‾=3r+s+t−1+3s−1−12⋅3t+2⋅3t−12=2⋅3r+s−1+3s−1+12⋅3t−1 \begin{aligned} n \geq \overline{1 \underbrace{00 \cdots 0}_{r} \underbrace{11 \cdots 1}_{s-1} \underbrace{22 \cdots 2}_{t}} & = 3^{r+s+t-1} + \frac{3^{s-1} - 1}{2} \cdot 3^{t} + 2 \cdot \frac{3^{t} - 1}{2} \\ & = \frac{2 \cdot 3^{r+s-1} + 3^{s-1} + 1}{2} \cdot 3^{t} - 1 \end{aligned}
Therefore
n−s(n)≥(2⋅3r+1)⋅3s−1−6⋅2s−1+12⋅3t+2s−1−1. n - s(n) \geq \frac{(2 \cdot 3^{r} + 1) \cdot 3^{s-1} - 6 \cdot 2^{s-1} + 1}{2} \cdot 3^{t} + 2^{s-1} - 1.
- If r≥1r \geq 1 and because s≥1s \geq 1 we have
n−s(n)≥7⋅3s−1−6⋅2s−1+12⋅3t+2s−1−1≥1+1−1>0. n - s(n) \geq \frac{7 \cdot 3^{s-1} - 6 \cdot 2^{s-1} + 1}{2} \cdot 3^{t} + 2^{s-1} - 1 \geq 1 + 1 - 1 > 0.
- If r=0r = 0 and s≥3s \geq 3 then
n−s(n)≥3⋅(3s−1−2s)+12⋅3t+2s−1−1≥2+4−1>0. n - s(n) \geq \frac{3 \cdot (3^{s-1} - 2^{s}) + 1}{2} \cdot 3^{t} + 2^{s-1} - 1 \geq 2 + 4 - 1 > 0.
- If r=0r = 0 and s=2s = 2 then n≤122⋯2⏟t1‾=2(3t+1−1)=s(n)n \leq \overline{1 \underbrace{22 \cdots 2}_{t} 1} = 2(3^{t+1} - 1) = s(n), and the equality is satisfied precisely when n=122⋯2⏟t1‾n = \overline{1 \underbrace{22 \cdots 2}_{t} 1}.
- If r=0r = 0 and s=1s = 1 then
n=122⋯2⏟t‾=3t+1−3t−1<3t+1−1=s(n). n = \overline{1 \underbrace{22 \cdots 2}_{t}} = 3^{t+1} - 3^{t} - 1 < 3^{t+1} - 1 = s(n).

Finally, we deduce that if in the digits of nn written in base 33,
(a) there is at least one 00, or three 11's, or no 00's and two 11's with the digit on the left is 22, then s(n)<ns(n) < n;
(b) n=122⋯21‾n = \overline{122 \cdots 21}, then s(n)=ns(n) = n;
(c) there are no 00's and two 11's with the digit on the left is 11 and the digit on the right is 22, or there are no 00's and at most one 11, then s(n)>ns(n) > n.

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.