How is the missing digit calculated

elementary-number-theorynumber theory

Recently I watched a video by Arthur Benjamin:

https://youtu.be/e4PTvXtz4GM?t=337

I was curious how we solved this part of his show, and would like to know.

Essentially at this point of the video, he asks three audience members to take the number $576$ and multiply it by a $4$ digit number. Thus the resulting product is a $6$ or $7$ digit number.

Then he asks each of the members to call out all 5 of their 6, or 6 of their 7 digits, and he will find the missing digit.

The first person calls:

$8,0,9,3,8$, and Arthur guesses $8$ as the digit he leaves out.

The second person calls:

$4,7,2,5,8,4$, and Arthur guesses $6$.

The third person calls:

$9,4,4,5,4,4$, and Arthur guesses $6$.


My question is, how exactly he knew this.

Firstly, I realize that adding each of the digits together in the product yields $36$, regardless of it being a $6$ or $7$ digit number. So then I assume that he just added all their digits and subtracted from $36$ to get their missing digit.

If this is the case, where did the number $36$ come from?

I don't think this is fully true, as something like $231\times 4412 = 1019172$, which has digits sum up to $21$.

I don't have any previous experience is number theory (if I need to know this to understand why it works)

Best Answer

It is a quite simple method of adding the digits and checking their remainder when divided by $9$. This is because $576$ is $9 \times 64$, so the resulting value would also be a multiple of $9$ and the missing digit would generally be $9$ less the remainder. This is because all powers of $10$ leave a remainder of $1$ when divided by $9$ since $10^n = \left(9 + 1\right)^n = 9^n + n \times 9^{n - 1} + \ldots + n \times 9 + 1$, for $n$ being a non-negative integer, with all of the terms being a multiple of $9$ except the last one. Thus, the remainder when a number is divided by $9$ is the same as when the sum of its digits are divided by $9$.

As for the sums in the examples being $36$, this is not always necessarily the case as you noticed yourself.

Regarding the person dropping $0$ or $9$, please see Mark Bennet's answer for how to handle that. I suspect the choice of $576$ and the limitation of the number to multiply it with being $4$ digits likely have to do with ensuring this issue of $0$ or $9$ can be overcome using some other method. This is likely another divisibility test (in particular, for $64$ (as Mark Bennet suggested) or a smaller power of $2$, as this is the other factor of $576$), but I haven't considered this in any detail.

Related Question