Find the $2019$th strictly positive integer $n$ such that $\binom{2n}{n}$ is not divisible by $5$.
Problem
Source: 2019 Pan-African Mathematics Olympiad, Problem 6
Tags: binomial coefficients, PAMO, number theory
09.04.2019 22:56
We require that $\nu_5 \left(\binom{2n}{n}\right) = 0$. By Legendre's formula, this is equivalent to $$ \sum_{k = 1}^{\infty} \left( \left\lfloor \frac{2n}{5^k} \right\rfloor - 2\left\lfloor \frac{n}{5^k} \right\rfloor \right) = 0. $$ We note that for any real number $x$, we have that $\lfloor 2x \rfloor \geq 2 \lfloor x \rfloor$, with equality if and only if $\{ x \} < \frac{1}{2}$, where $\{ x \}$ denotes the fractional part of $x$. We thus require that $$ \left\{ \frac{n}{5^k} \right\} < \frac{1}{2} $$for all $k \geq 1$. We claim that $n$ satisfies the conditions of the problem if and only if the base $5$ digits of $n$ are all $0$, $1$, or $2$. Let $$ n = \sum_{m = 0}^{\infty} d_m 5^m $$be the base $5$ expansion of $n$. If $n$ satisfies the conditions of the problem, then for any $k \geq 0$, we have that $$ \frac{1}{2} > \left\{ \frac{n}{5^{k + 1}} \right\} = \sum_{m = 0}^{k} d_m 5^{m - k - 1} \geq d_k 5^{-1} $$and so $d_k < \frac{5}{2}$, giving us that $d_k \leq 2$. Conversely, suppose that $d_m \leq 2$ for all $m$. Then for any $k$, we have that $$ \left\{ \frac{n}{5^k} \right\} = \sum_{m = 0}^{k - 1} d_m 5^{m - k} \leq 2 \sum_{m = 1}^{k} 5^{-m} < 2 \sum_{m = 1}^{\infty} 5^{-m} = \frac{1}{2} $$and so $n$ satisfies the conditions of the problem. We are thus seeking the $2019\text{th}$ natural number $n$ such that the base $5$ expansion of $n$ consists only of the digits $0$, $1$, and $2$. If we ignore the fact that the expansion is a number in base $5$, then the string of digits can also be interpreted as a number in base $3$, and so we see that the $2019\text{th}$ valid string of digits is given by the base $3$ expansion of $2019$, which is $2202210_3$. It follows that the number that we are looking for is $2202210_5 = 37805$.
09.04.2019 23:00
Alternative ways to derive that the base $5$ digits of $n$ must all be $0$, $1$, or $2$ include Kummer's Theorem, and Lucas' Theorem. Kummer's theorem tells us that that number of times a prime $p$ divides $\binom{n}{m}$ is equal to the number of carries when calculating $n = m + (n - m)$ in base $p$. In this case, we see that there must be no carries when calculating $n + n = 2n$ in base $5$, and so the base $5$ digits of $n$ must all be at most $2$. Lucas' Theorem implies that $\binom{2n}{n}$ is divisible by $5$ if any of the base $5$ digits of $2n$ are smaller than the corresponding base $5$ digit of $n$. This is again equivalent to any of the digits of $n$ being larger than $2$.
15.09.2019 13:52
DylanN wrote: Lucas' Theorem implies that $\binom{2n}{n}$ is divisible by $5$ if any of the base $5$ digits of $2n$ are smaller than the corresponding base $5$ digit of $n$. This is again equivalent to any of the digits of $n$ being larger than $2$. With Lucas theorem, how can we conclude that all the digits in base 5 are atmost 2. It is possible that few of them are atmost 2 whereas others are not.
02.11.2019 21:38
Combigeontal231 wrote: With Lucas theorem, how can we conclude that all the digits in base 5 are atmost 2. It is possible that few of them are atmost 2 whereas others are not. Let $2n = (e_1 e_2 \dots e_k)_5$ be the base-$5$ representation of $2n$, and let $n = (d_1 d_2 \dots d_k)_5$ be the base-$5$ representation of $n$, with leading $0$'s added if necessary so that the two numbers have the same number of digits. Lucas' Theorem tells us that $$ \binom{2n}{n} \equiv \binom{e_1}{d_1} \binom{e_2}{d_2} \cdots \binom{e_k}{d_k} \pmod{5}. $$ In particular, $\binom{2n}{n}$ is divisible by $5$ if and only if $\binom{e_i}{d_i} \equiv 0 \pmod{5}$ for some $i$. Since $e_i < 5$ for each $i$, this is equivalent to $\binom{e_i}{d_i} = 0$, which is equivalent to $e_i < d_i$. If for all $i$ we have that $d_i \leq 2$, then we know that no carries occur when calculating $2n$, and so we know that $e_i = 2d_i$ for each $i$. In particular, $e_i \geq d_i$ for each $i$, and so $\binom{2n}{n}$ is not divisible by $5$. On the other hand, suppose that one of the digits of $n$ is larger than $2$. Let $j$ be the largest natural number such that $d_j > 2$.(In other words, we look at the right-most digit that is larger than $2$.) We can see that then $e_j = 2d_j - 5$ (There isn't a carry from any of the digits further to the right since they were all at most $2$.) Since $d_j < 5$, we have that $2d_j - 5 < d_j$, and so $e_j < d_j$, giving us that $\binom{2n}{n}$ is divisible by $5$.