There are 2017 jars in a row on a table, initially empty. Each day, a nice man picks ten consecutive jars and deposits one coin in each of the ten jars. Later, Kelvin the Frog comes back to see that of the jars all contain the same positive integer number of coins (i.e. there is an integer such that of the jars have exactly coins). What is the maximum possible value of ?
Solution
Label the jars . I claim that the answer is 2014. To show this, we need both a construction and an upper bound. For the construction, for , put a coin in the jars . After this, each of the jars has exactly one coin. Now, put a coin in each of the jars . Now, the jars all have exactly one coin. This gives a construction for (where ). Now, we show that this is optimal. Let denote the number of coins in each of the jars. For , define Note that throughout the process, . It is also easy to check that the sums each involve 202 jars, while the sums each involve 201 jars. Call a jar good if it has exactly coins. If there are at least 2015 good jars, then one can check that it is forced that at least one of only involves good jars, and similarly, at least one of only involves good jars. But this would mean that as all are equal, contradiction.