Ponder This Challenge - February 2026 - Blot-avoiding backgammon strategy
- Ponder This
Denote by the size of the set of all natural numbers between and that have the digit in their usual decimal representation. For example, and .
We see that for , we have , i.e., exactly 50% of the numbers up to 1456 contain the digit 1. For , we have .
Your goal: For each between 1 and 9, find the maximum value of for which .
An optional goal: Find a simple formula giving those maximum values for as many values of as possible.
A bonus "*" will be given for finding the maximum value of for which (i.e., only solve the case . but for this time).
December 2024 Solution:
The solution for 1/2 is [1062880, 2125762, 3188644, 4251526, 5314408, 6377290, 17006110, 18068992, 19131874].
The solution for 3/4 is 10167463313312
A simple formula giving the solutions is where ; this gives the correct values for (and for gives values which result in but are not maximal). Other (non-maximal) values resulting in 1/2 also corresponds to this formula for other values of . To solve the problems efficiently, it is useful to have
For a simple recursive algorithm for , first note that any can be written as where , i.e. we split by taking its most significant digit and the rest of the number .
For example, if then so in this case, and .
Now note that we have the relation
Using this relation, computing is immediate even for very large values of .
For an upper bound, first note that computing is very easy: The total number of -length strings of digits is , and the number of such strings not containing is , so up to and not including we have such strings. If we also count itself, so all in all with being the usual Kronecker's delta.
This upper bound shows that as tends to infinity, the proportion tends to 1. Combined with a quick way to compute for specific numbers and using smart search methods (even binary search is efficient here, given a better understanding of the behaviour of ) this solves both the standard problem and the bonus.
We do not know of an analytical way to solve the problem. Some of you suggested beautiful approaches based in one way or another on the formula described above which generalizes to when we want to find the proportion ; e.g. for choosing we obtain the formula which correctly yields 10167463313312 for However, as the counterexamples for the formula for and show, it does not always work.