Maths Olympiad Prep

Library / Saudi Arabian Mathematical Competitions /363 of 395

Saudi Arabian Mathematical Competitions

Combinatorics Difficulty 7.0 National Olympiad Prove it Saudi Arabia

Let Pascal triangle be an equilateral triangular array of numbers, consisting of 20192019 rows and except for the numbers in the bottom row, each number is equal to the sum of two numbers immediately below it. How many ways to assign each of numbers a0,a1,…,a2018a_{0}, a_{1}, \ldots, a_{2018} (from left to right) in the bottom row by 00 or 11 such that the number SS on the top is divisible by 10191019.

Solution

First, by induction, one can show that
S=(n0)a0+(n1)a1+⋯+(nn)an S = \binom{n}{0} a_{0} + \binom{n}{1} a_{1} + \cdots + \binom{n}{n} a_{n}
if the Pascal triangle consists of nn rows.

Note that for any odd prime pp, we also have:

Claim 1. (2pp)≡2(modp)\binom{2p}{p} \equiv 2 \pmod{p}.
Indeed,
(2pp)−2=(2p)!p!p!−2=(p+1)(p+2)…(2p−1)(2p)p!−2=2(p+1)(p+2)…(2p−1)−(p−1)!(p−1)! \begin{aligned} & \binom{2p}{p} - 2 = \frac{(2p)!}{p!p!} - 2 = \frac{(p+1)(p+2) \ldots (2p-1)(2p)}{p!} - 2 \\ & = 2 \frac{(p+1)(p+2) \ldots (2p-1) - (p-1)!}{(p-1)!} \end{aligned}
The numerator is congruent to 1⋅2⋅3⋅(p−1)−(p−1)!=0(modp)1 \cdot 2 \cdot 3 \cdot (p-1) - (p-1)! = 0 \pmod{p} so (2pp)≡2(modp)\binom{2p}{p} \equiv 2 \pmod{p}.

Claim 2. (2pk)≡0(modp)\binom{2p}{k} \equiv 0 \pmod{p} for 1≤k≤2p−11 \leq k \leq 2p-1 and k≠pk \neq p.
Indeed,
Since (2pk)=(2p2p−k)\binom{2p}{k} = \binom{2p}{2p-k} so we can suppose 1≤k<p1 \leq k < p. Similar calculation, we have
(2pk)=(2p−k+1)(2p−k+2)…(2p−1)(2p)k!. \binom{2p}{k} = \frac{(2p-k+1)(2p-k+2) \ldots (2p-1)(2p)}{k!}.
The numerator is divisible by pp while (p,k!)=1(p, k!) = 1 since 1≤k<p1 \leq k < p so we are done.

From this, we can conclude that, if 1009∣S1009 \mid S then a0+a2018+2a1009a_{0} + a_{2018} + 2 a_{1009} is divisible by 10091009. This only happens when all of them are equal to 00.

The other numbers can be assigned any of 00 or 11 so the number of ways is 220162^{2016}.

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.