Last 7 digits of 7th powers

331 Views Asked by At

Alice and Bob play the following game. They alternately select distinct nonzero digits from $1$ to $9$, until they have chosen seven such digits. Consider the resulting seven-digit number by joining the digits in the order selected, with the seventh digit appearing last (i.e. $\overline{A_1B_2A_3B_4A_6B_6A_7}$). Alice wins if and only if the resulting number is the last seven decimal digits of some perfect seventh power. Which player has the winning strategy?

I have tried this but got nothing useful.

1

There are 1 best solutions below

10
On

Wins Alice because she has the possibility of choosing the last digit and is enough to choose something coprime with 10, say 1. Then the remaining number seen as an element of $\mathbb{Z}/10^7\mathbb{Z}$ is an invertible element of that ring. And the group of unit,G, of $\mathbb{Z}/10^7\mathbb{Z}$ has $\phi(10^7)$ elements that is a number coprime with 7. Thus consider the map $G \to G: g \to g^7$, is a group homomorphism, and is injective(the order of an element in the kernel has to divide two coprime numbers, thus it has to be 1) so is surjective. So in G every element is a 7-th power, particularly the one resulting by the choice of Alice as last digit( namely, anyone between 1,3,7,9), but this is exactly what makes Alice a winner.