MathDB
2018 MOAA Team P10

Source:

January 23, 2022
combinatoricsteam2018

Problem Statement

Vincent is playing a game with Evil Bill. The game uses an infinite number of red balls, an infinite number of green balls, and a very large bag. Vincent first picks two nonnegative integers gg and kk such that g<k2016g < k \le 2016, and Evil Bill places gg green balls and 2016g2016 - g red balls in the bag, so that there is a total of 20162016 balls in the bag. Vincent then picks a ball of either color and places it in the bag. Evil Bill then inspects the bag. If the ratio of green balls to total balls in the bag is ever exactly k2016\frac{k}{2016} , then Evil Bill wins. If the ratio of green balls to total balls is greater than k2016\frac{k}{2016} , then Vincent wins. Otherwise, Vincent and Evil Bill repeat the previous two actions (Vincent picks a ball and Evil Bill inspects the bag). If SS is the sum of all possible values of kk that Vincent could choose and be able to win, determine the largest prime factor of SS.