15

In Veritasium's video about $37$, something interesting is brought up about its multiples. For any multiple of $37$, reverse it and put a $0$ between all of its digits and the new number will be a multiple for $37$. For example,

$$ 37 \rightarrow 703 = 19 \cdot 37$$ $$ 74 \rightarrow 407 = 11 \cdot 37$$

Why does this happen? Can someone prove it?

Sahaj
  • 5,355
  • 2
    See for example here. – Dietrich Burde Mar 28 '24 at 20:28
  • Brute-force verification proofs like that in the blog linked by @Dietrich do not do a great job answering the OP's question "Why does this happen?". I posted a more conceptual answer which explains it from a more general standpoint by highlighting the key symmetry: reversal / reciprocation of digits and radix yields a congruent integer (up to a $\color{#888}{\rm digit\ shift}$). $\ \ $ – Bill Dubuque Apr 22 '25 at 02:05

3 Answers3

10

I’m not sure if this is the simplest way to present a solution, but I think it works.

Start with $k=10^n a_n + 10^{n-1}a_{n-1}+\dots + 10a_1+ a_0$. Then $k’ = 10^{2n}a_0+10^{2n-2} a_1+ \dots + 10^2a_{n-1}+ a_n$ where $k’$ is the integer formed by reversing the digits of $k$ and adding in $0$s between adjacent digits.

We note that $\bmod {37}: 10^3\equiv 1, 10^2\equiv 26, 10\equiv 10$. Then, $$\bmod {37}: k \equiv \underbrace{(a_{0}+a_{3}+a_6+\dots)}_{S_1}+10(\underbrace{a_1+a_4+a_7+\dots}_{S_2})+26(\underbrace{a_2+a_5+a_8+\dots}_{S_3})\equiv 0$$ whereas, $$\mod {37}: k’\equiv (\underbrace{a_n+a_{n-3}+a_{n-6}+\dots}_{L_1})+26(\underbrace{a_{n-1}+a_{n-4}+a_{n-7}+\dots}_{L_2})+10(\underbrace{a_{n-2}+a_{n-5}+a_{n-8}+\dots}_{L_3})$$

Case $1$: Suppose $n$ is a multiple of $3$. Then we get that $S_1=L_1$, $S_2=L_3$ and $S_3=L_2$, thereby giving $\bmod {37}: k\equiv k’$.

Case $2$: $n$ is one more than a multiple of $3$. Then $S_2=L_1$, $L_2=S_1$ and $S_3=L_3$. Then, $\bmod {37}: k’\equiv S_2 +26 S_1+10S_3\implies 10k’ \equiv 10S_2+260S_1+100S_3\equiv S_1+10S_2+26S_3\equiv k \equiv 0$.

Case $3$: $n$ is two more than a multiple of $3$. Then $S_3=L_1$, $ L_3=S_1$, $L_2=S_2$. It follows $\bmod{37}: k’\equiv S_3+26S_2+10S_1\implies 26k’\equiv 26S_3+ 10S_2+S_1\equiv k\equiv 0$.

This shows that $\bmod {37}: k’\equiv 0$ regardless of choice of $n$.

NOTE: we have shown more generally that if $k$ has $3m+1$ digits then $\bmod {37}: k’\equiv k$, if $k$ has $3m+2$ digits then $\bmod {37}: 10k’\equiv k$ and if $k$ has $3m$ digits then $\bmod {37}: 26k’\equiv k$.

Sahaj
  • 5,355
  • 1
    You can eliminate the $3$ cases by padding with zeros - see the end of my answer. As we see there, using (radix) polynomials helps to clarify the key reciprocation (reversal) symmetry. – Bill Dubuque Apr 22 '25 at 01:47
9

It arises simply by iterating the common (reverse) divisibility test for $37$ in radix $100,\,$ viz.

$$\quad\ \ \ 37\mid \color{#c00}{100}\:\!a\!+\!b\!\!\overset{\times\ \color{#0a0}{10}\!}\iff 37\mid \color{#0a0}{10}\:\!b\!+\!a\quad [{\rm by}\ \color{#c00}{100}\cdot \color{#0a0}{10}\equiv_{37}1]$$

Iterated, it reverses the digits $\,(a,b\to b,a)\,$ and inverts radix $\color{#c00}{100}\to \color{#0a0}{10}\equiv_{37} 100^{-1}\,$ e.g.

$$\begin{align} &\qquad 37\mid 407\ =\!\!\overbrace{47_{\color{#c00}{100}}\!\iff 37\mid 74_{\:\!\color{#0a0}{10}}}^{\large \textbf{reverse}\text{ digits},\ \rm\color{#c00}{in}\color{#0a0}{vert} \ radix}\\[.5em] &37\mid 4030201\!=\! {4321_{\color{#c00}{100}}}\!\iff 37\mid 1234_{\:\!\color{#0a0}{10}}\\[.5em] {\rm by}\ \bmod & 37\!:\, 4030201\!=\! 4321_{\color{#c00}{100}}\,\equiv\, 1234_{\color{#0a0}{10}}\ \ \text{[by Hint below]} \end{align}\qquad\qquad\ \ $$

It's easy to prove using the polynomial form of radix rep, and its reversed (reciprocal) polynomial.

$$\!\begin{align} {\bf Hint}\!:\,\ \bmod \ \color{darkorange}{t^3}\:\!&\color{darkorange}{\equiv 1}\!:\ \ \ \ \color{#0af}{t\equiv t^{-2}},\,\ \color{#888}{t^6\equiv 1}\ \ \ \ [\color{darkorange}{\,t\!=\!10}\ \rm\ in\ OP]\\[.3em] {\rm thus}\, \ \ \ \ \ &\ \ \ \ \ \ \ \ \ \ p(\color{#0af}{t})\ \ \ \,=\ \, \color{#c00}a^{\vphantom .}\:\!t^3 + \color{#c00}b^{\vphantom .}\:\!t^2+ \color{#c00}c\,t\, +\, \color{#c00}d\\[.3em] &\equiv\ \color{grey}{t^6\:\!} p(\color{#0af}{t^{-2}})\, \equiv \ \color{#0a0}a\ \,+\, \ \color{#0a0}b^{\vphantom .}\:\!t^2 + \color{#0a0}c^{\vphantom .}\:\!t^4+\color{#0a0}d^{\vphantom .}t^6\\[-.1em] \overset{\color{darkorange}{\large t\ =\ 10_{\vphantom{.}}}}\Longrightarrow\ \ \ \ &\!\!\!\!\!{\rm \color{#c00}{abcd}\equiv \color{#0a0}{d0c0b0a}}\!\!\!\pmod{\!{\bf 37}\cdot 27=\color{darkorange}{10^3\!-\!1}}\\[.2em] {\rm e.g.}\quad\ \ &\!\!\!\!\!\color{#c00}{1234}\equiv \color{#0a0}{4030201\! = \!4321_{100}} \end{align}\qquad\qquad\qquad\ $$

Generally reversed $\,\tilde p(t^2)= \color{#888}{t^{2k}}\:\!p(\color{#0af}{t^{-2}})\equiv \color{#888}{t^j}p(\color{#0af}t)\pmod {\!\color{darkorange}{t^{3}\!-\!1}},\, $ for $\,k \!=\! \deg\:\! p,\,$ $\,\color{#888}{j={2k}\bmod 3}.\,$ This is a slight twist (squared argument) on the formula for the reversed (reciprocal) polynomial.

The pesky (shift) multiplier $\:\!\color{#888}{t^{2k}}\:\!$ disappears when $\,3\mid \color{#888}k,\,$ which we can assume wlog by appending $\color{#888}{\rm zero}$ digits as need be, e.g. with $\rm\,abcd = \color{#888}{00}74\,$ in $\:\!\rm\color{#c00}{H}\!=\!$ Hint we get the OP claim as follows

$$\bmod 37\!:\,\ 0\equiv \color{#888}{00}74_{10}\overset{\rm\color{#c00}{H_{\vphantom{|}}}}\equiv 47\color{#888}{00}_{100},\,\ {\rm so}\:\ 37\mid 47_{100}=\color{0a0}{407}_{10}\qquad\ \ \ $$

since we can ignore final $\rm\color{#888}{zeros}\,$ (by $\,37\mid \color{#888}{10^j}\:\!m\!\iff\! 37\mid m\,$ by Euclid's Lemma & $(37,\color{#888}{10})\!=\!1$).

Thus such divisibility tests are special cases of the above reverse digits congruence. Just like in casting out nines, the congruence form is more powerful than the divisibility test form, since the congruence applies more generally to arbitrary mod arithmetic (vs. only to $\:\!\equiv 0\:\!$ tests), e.g. it also yields congruences such as $\, 1\equiv 75_{10}\equiv5700_{100} \pmod{\!37}\,$ [= increment of above].

Bill Dubuque
  • 282,220
1

Note:

$111 = 10\cdot 10 + 10 + 1=$
$(9+1)10 + 10 + (10-9)=$
$9\cdot 10 + (3*10-3)$

So $\frac {111}3 = 3\cdot 10 + (30-3) = 37$.
As a result $2\cdot 37 = (3-1)37 = 111 - (3\cdot 10+(10-3))=$
$(10\cdot 10 + (10+1))- (3\cdot 10 +(10-3))=$
$(10-3)10 + (3+1) = 74$ and $2\times \color{blue}3\color{red}7 = \color{red}7(\color{blue}3 + 1)$

He we can see why $\color{red}70\color{blue}3$ is a multiple of $37$ because if we add $\color{blue}3\color{red}7$ to it we get:

$[(10-3)\cdot 10\cdot 10 + 0\cdot 10 + 3]+ [3\cdot 10 + (10-3)]=$
$(10-3)\cdot 10\cdot 10 + 3\cdot 10 + [3 + (10-3)]=$ $(10-3)\cdot 10 \cdot 10 + 3\cdot 10 + 10 = $
$(10-3)\cdot 10 \cdot 10 + (3+1)\cdot 10=$
$[7\cdot 10 + (3+1)]\cdot 10 = (2\cdot 37)\cdot 10= 20\times 37$

So $703 = 19\cdot 37$.

And we can do similar for $74\to 407=(\color{blue}3+1)\cdot 100 + \color{red}7$ by subtracting $\color{blue}3\color{red}7$.

$[(3+1)\cdot 10\cdot 10 + 0\cdot 10 + (10-3)]-[3\times 10 + (10 -3)]=$

$3\cdot 10\cdot 10 + [10-3]\cdot 10 + 0 =$
$(3\cdot 10 + [10-3])\cdot 10 = 37\cdot 10$

So $407 = 11\cdot 37$

....

To show $10101$ is a multiple of $37$ is slightly different:

$10101\cdot 11 = 111111 = 111\cdot 1001 = (3\cdot 37)\cdot 1001$. As $11$ is prime we must have $11|3$ or $11\mid 37$ or $11\mid 1001$. As the first two are false we must have $11\mid 1001$. (Indeed $1001 = 11\cdot 91$).

So $10101 = 37\cdot (3\times \frac {1001}9)$.

Now we have three base cases. We can prove the rest by strong induction in showing that if

$.....dcba$ is a multiple of $37$ and $a0b0c0d0.....$ is to then if

$.....dcba+111= .....d'c'b'a'$ then $a'0b'0c'0d'0.....$ is also a multple of $37$.

In general adding $111$ to $....dcba$ will increase $c,b,a$ each by $1$. This increases $a0b0c0....$ by $10101.....$ which is a multiple of $37$. And we are done.... except for that pesky business of carrying. If one of $a,b,c$ is equal to $9$ we have a slight issue.

But not a big one.

Easiest case is: $c<8;b=9;a<9$ so $bca+111 = (c+2)0(a+1)$. Meanwhile increasing $a0b0c0....$ by $101010......$ yields $(a+1)100(c+1)0...$. But that's okay. If we add $0011100....$ to that we get $(a+1)111(c+2)0.....$ and then subtracting $0111000.....$ from that yields $(a+1)000(c+2)0....$ which must be a multiple of $37$ as desired.

Now... here I'm going wave my hands and walk away... we may have a case of "large carrying" where $......k999999ba$ and adding $111$ will yield $....(k+1)000000(b+1)(a+1)$ but adding $10101000....$ to $a0b0909090909090....$ yields $(a+1)0(b+1)1009090909090....$ we can fix that by noting $1009-111=0898; 0898-888=0010$ so

$(a+1)0(b+1)1009090909090k..\to$
$(a+1)0(b+1)0010090909090k..\to$
$(a+1)0(b+1)0000100909090k..\to$
$(a+1)0(b+1)0000001009090k..\to$
$(a+1)0(b+1)0000000010090k..\to$
$(a+1)0(b+1)0000000000100k..\to$

Now here we can add $111$ to $100k$ to get:

$(a+1)0(b+1)0000000000111(k+1)..$ and subtract $1110$ from $111(k+1)$ to get

$(a+1)0(b+1)0000000000000(k+1)...$

is a multiple of $37$ as desired.

fleablood
  • 130,341