Problem: Let $m$ and $n$ be positive integers.
Prove that there exists a positive integer $c$
such that $cm$ and $cn$ have the same nonzero decimal digits.

Solution: One-line spoiler: $142857$.

More verbosely,
the idea is to look at the decimal representation of $1/D$, $m/D$, $n/D$
for a suitable denominator $D$, which have a ``cyclic shift'' property
in which the digits of $n/D$ are the digits of $m/D$ shifted by $3$.

\begin{remark*}
  [An example to follow along]
  Here is an example to follow along in the subsequent proof
  If $m = 4$ and $n = 23$ then the magic numbers $e = 3$ and $D = 41$ obey
  \[ 10^3 \cdot \frac{4}{41} = 97 + \frac{23}{41}. \]
  The idea is that
  \begin{align*}
    \frac{1}{41} &= 0.\ol{02439} \\
    \frac{4}{41} &= 0.\ol{09756} \\
    \frac{23}{41} &= 0.\ol{56097}
  \end{align*}
  and so $c = 2349$ works;
  we get $4c = 9756$ and $23c = 56097$
  which are cyclic shifts of each other by $3$ places
  (with some leading zeros appended).
\end{remark*}

Here is the one to use:
\begin{claim*}
  There exists positive integers $D$ and $e$
  such that $\gcd(D,10)=1$, $D > \max(m,n)$,
  and moreover \[ \frac{ 10^e m - n }{ D } \in \ZZ. \]
\end{claim*}
\begin{proof}
  Suppose we pick some exponent $e$ and define the number
  \[ A = 10^e n - m. \]
  Let $r = \nu_2(m)$ and $s = \nu_5(m)$.
  As long as $e > \max(r,s)$ we have $\nu_2(A) = r$ and $\nu_5(A) = s$, too.
  Now choose any $e > \max(r,s)$ big enough that $A > 2^r 5^s \max(m,n)$ also holds.
  Then the number $D = \frac{A}{2^r 5^s}$ works;
  the first two properties hold by construction and
  \[ 10^e \cdot \frac nD - \frac mD
    = \frac{A}{D} = 2^r 5^s \]
  is an integer.
\end{proof}
\begin{remark*}
  [For people who like obscure theorems]
  Kobayashi's theorem implies we can actually pick $D$ to be prime.
\end{remark*}
Now we take $c$ to be the
number under the bar of $1/D$ (leading zeros removed).
Then the decimal representation of $\frac mD$
is the decimal representation of $cm$ repeated
(possibly including leading zeros).
Similarly, $\frac nD$ has the decimal representation of $cm$ repeated (possibly including leading zeros).
Finally, since
\[ 10^e \cdot \frac mD - \frac nD \text{ is an integer} \]
it follows that these repeating decimal representations are rotations of each other by $e$ places,
so in particular they have the same number of nonzero digits.


\begin{remark*}
  Many students tried to find a $D$ satisfying the stronger hypothesis
  that $1/D$, $2/D$, \dots, $(D-1)/D$
  are cyclic shifts of each other.
  For example, this holds in the famous $D = 7$ case.

  The official USAMO 2013 solutions try to do this by proving
  that $10$ is a primitive root modulo $7^e$
  for each $e \ge 1$, by Hensel lifting lemma.
  I think this argument is actually \emph{incorrect},
  because it breaks if either $m$ or $n$ are divisible by $7$.
  Put bluntly, $\frac{7}{49}$ and $\frac{8}{49}$
  are not shifts of each other.

  One may be tempted to resort to using large primes $D$
  rather than powers of $7$ to deal with this issue.
  However it is an open conjecture
  (a special case of Artin's primitive root conjecture)
  whether or not $10 \pmod p$ is primitive infinitely often,
  which is the necessary conjecture
  so this is harder than it seems.
\end{remark*}