Multiplication that preserves the digits

140 Views Asked by At

I realized that no matter how many times you multiply 25 by 5, the last two digits will always be 25:

$125, 625, 3125, ...$

Similarly, no matter how many times you multiply 20 by 6, the last two digits will always be 20:

$120, 720, 4320, ...$

The same is true for 2, 4, 5, 10, and 50. So for any divisor $x$ of 100, you can multiply $x$ by a certain number (namely $\frac{100}{x} + 1$) any number of times, and the result will still have $x$ as the last two digits. I assume we can generalize to the following:

Conjecture. For any $n \geq 1$, take a number $x$ that divides $10^n$. Then for all $m \geq 1$, the last $n$ digits of $x \left( \frac{10^n}{x} + 1 \right)^m$ will be $x$.

Questions:

  1. Is it possible to prove this?

  2. Does this property hold for any other numbers, besides just divisors of $10^n$ (namely, you can multiply the number by something else any number of times, and the last digits will always be the original number)?

2

There are 2 best solutions below

0
On BEST ANSWER

For 1. :

Yes. By the binomial theorem,

$$\begin{align}x \left( \frac{10^n}{x} + 1 \right)^m& =x\sum_{k=0}^{m}\binom mk\left(\frac{10^n}{x}\right)^k\\\\& =x\left(1+\sum_{k=1}^{m}\binom mk\left(\frac{10^n}{x}\right)^k\right)\\\\&=x+10^n\sum_{k=1}^{m}\binom mk\left(\frac{10^n}{x}\right)^{k-1} \\\\&\equiv x\pmod{10^n}\end{align}$$

0
On

Yes, it generalizes widely as below. OP is special case $\ m = 10^n,\,\ d = x\ \! (\!\iff\! x\mid m)$

Theorem $\,\ xa\equiv x\pmod m\iff a\equiv 1\pmod{m/d},\ \ d = \gcd(x,m).\ \ $ Proof $\ $ is below.

$ m \mid x(a\!-\!1)\!\!\!\!\overset{\large\ \ \ \ \times d^{-1}}\iff\! \color{#c00}{m/d}\mid \color{#c00}{x/d}(a\!-\!1)\!\!\overset{\rm\,\color{#c00}{Euclid}}\iff m/d\mid a\!-\!1,\,$ by $\,\gcd(\color{#c00}{m/d,x/d})=\gcd(m,x)/d=1$


Corollary $\,\ xa \equiv x \,\Rightarrow\, xa^k\equiv x,\ $ since $\,\ xa^{k+1}\equiv (\color{#0a0}{xa^k})a\equiv \color{#0a0}xa\equiv x\ $ by $\rm\color{#0a0}{induction}$