Alice and Bob play a game. Starting from Alice, two guys take turns to choose a digit from to without repetition, and put them from the leftmost to the rightmost to form a -digit integer (i.e., ). If there exists a perfect th-power that ends in these digits, then Alice wins; otherwise, Bob wins. Who has the winning strategy?
Solution
Alice has a winning strategy. By the following lemma, as long as Alice makes , Alice will necessarily win; and since Bob can block at most three of these, Alice must win.
Lemma
If and , then has a solution.
Proof
We first prove:
Claim. If and , then .
Pf of Claim. Note that
Therefore . Also note that is not a multiple of or , so or , and or . We now prove that both "or" statements must hold in the former way.
1. Since and must both be odd, and the two factors cannot have a common factor, it follows that .
2. Note that if , then . Substituting this in, it is easy to see that ; and .
Combining the above, the Claim is proved.
Returning to the original problem, by the Claim, the reduced residue system modulo , after being raised to the seventh power, remains a reduced residue system, hence always has a solution.