Yesterday I posted a very simple math puzzle to Twitter that I found in Jonathan Baron’s book, Thinking and Deciding. The puzzle is the following:

Show that every number of the form ABC,ABC is divisible by 13.

The puzzle comes up in Baron’s book as an example of an “insight problem” in which one goes from not knowing the answer at all to knowing the complete answering in a sudden moment of insight.

Several people replied to my tweet with solutions: I especially like Will Townes’s solution. In particular, if you’re familiar with modular arithmetic, I like the logic of Will’s answer because it gives a simple generalization. First, represent ABC,ABC as ABC * 1000 + ABC * 1 rather than as ABC * 1001. Then notice that

- 1 = 1 mod 13
- 1000 = -1 mod 13

Thus ABC,ABC = ABC * -1 + ABC * 1 = 0 mod 13. This logic can be easily extended to show that (ABC,ABC,)*ABC,ABC = 0 mod 13 no matter how many times you repeat the ABC,ABC pattern.

Isn’t it just enough to notice that ABCABC = 1001 * ABC and that 1001 = 0 mod 13?

or without modular arithmetic: abcabc = abc * 7700 * 13 is obviously divisible by 13.

Yes, Z, that is certainly enough. Indeed, that answer is essentially identical to Will Townes’ answer cited above. The modular arithmetic argument only reframes the basic insight into the problem.

That said, I do like the modular arithmetic reframing, because it extends naturally to longer sequences like ABC,ABC,ABC,ABC, while the explicit factorization requires showing that 1001 = 0 mod 13, that 1001001001 = 0 mod 13, and so on.

Hello,

ABCABCABCABC is also simple enough (and similarly for an even amount of ABC): since ABC,ABC,ABC,ABC = 10^6*(ABCABC) + (ABCABC) = 0 mod 13 since ABCABC is.

Or rather, ABCABC,ABCABC is divisible by 13 since ABCABC is (and similarly for an even amount of ABC). I just think using modulo arithmetic is totally overkill for a simple problem like this one.

mikko, how can you say that modular arithmetic is totally overkill? you seem to imply that some maths are more inherent than others.

the author only seemed to say that he liked the modular solution, not that it was (in some arbitrary viewpoint) the most basic solution; if he likes a piece of math because it shows the answer to the problem in an interesting way, that’s great.

Hi John,

I ran into an old colleague today and he told me he had seen my answer here on your blog. I didn’t even realize you had posted it, so thanks for indirectly reconnecting me with him! I’m flattered that you enjoyed the solution enough to post it. It’s always a pleasure to learn from your ideas.

Best wishes,

Will Townes

That’s a great story, Will. Thanks so much for sharing it!