Any digit written $6k$ times forms a number divisible by $13$

284 Views Asked by At

Any digit written $6k$ times (like $111111$, $222222222222222222222222$, etc.) forms a number divisible by $13$. (source: a solution taken from careerbless)

I tested with many numbers and it seems this is correct. But, is it possible to prove this mathematically? If so, it will be a convincing statement. Please help. I am not able to think how such properties can be proved.

2

There are 2 best solutions below

0
On BEST ANSWER

Here's an overview of the proof:

  1. Prove $111111$ is a multiple of $13$. (Hint: Use a calculator.)
  2. Prove that all numbers with a digit written $6k$ times is a multiple of $111111$. You can do this by splitting a number up into groups of $6$ digits like this: $$222222222222222222=222222000000000000+222222000000+222222$$
0
On

Hint $\ $ Casting $13$s: $\ $ mod $13\!:\ \color{#c00}{10^3\equiv\, -1}\ $ by $\, 10^3\equiv (-3)^3 \equiv -27\equiv -1$

Thus applying this to $\ 10^{3k}= (\color{#c00}{10^3})^k\equiv (\color{#c00}{-1})^k\ $ we can cast $13$s in radix $10^3$

$$\begin{eqnarray} d_0& + \color{#c00}{10^3} &d_1 + \color{#c00}{10^6} &d_2+ \color{#c00}{10^9} &d_3 +\, \cdots\\ \equiv\ d_0&\color{#c00}-&d_1\ \ \ + &d_2\ \ \ \color{#c00}- &d_3 +\, \cdots \pmod{13}\end{eqnarray}$$

For example: $\ 222222111111 \,\equiv\, 111-111 + 222-222\,\equiv\, 0\pmod{13}$