August 2025 - Solution
August 2025 Solution:
The solutions for the main and bonus question are6608 16904
This riddle touches upon the fascinating subject of combinatorial game theory, which is presented in a delightful manner in the book "Winning Ways for Your Mathematical Plays " by Berlekamp, Conway and Guy, which also includes the game presented in the riddle (referred to as "Maundy Cake") and credits Patrick Mauhin for its invention and solution. The numbers in the riddle were chosen such that a general knowledge of computing the value of a game (an interesting and non-trivial problem by itself, explained in great detail in the book) suffices for the main riddle, but for the bonus a more problem- specific solution is required.
The method is as follows: given a number n we can form a chain n, n_1, n_2,\ldots,1 where every number is obtained from the previous one by dividing it by its smallest prime factor. For example, if n=630 we obtain the chain 630, 315, 105, 35, 7, 1.
Now, given a a\times b grid form the chains for a,b. If the chains are of equal length, the value of the game is 0. Otherwise, in the longer chain, sum the surplus values.
For example, if a=630 while b=75, we obtain the chains
630, 315, 105, 35, 7, 1 75, 15, 1
Thus Alice wins, with value -(35+7+1)=-43. The chains are easy to compute given the factoring of a,b; in this riddle, the factors were chosen among the first 2,000 primes to make brute-force factoring feasible.