Finding missing digits in factorials

1.5k Views Asked by At
  • $14! = 871\color{red}{a}82\color{red}{b}1200$ without working out $14!$, find $\color{red}{a}$ and $\color{red}{b}$.

I think it has something to do with maths rules regarding $9$ or $3$ $\left(~\mbox{the}\right.$ digits adding up to either of those $\left.\mbox{numbers}~\right)$ but not entirely sure !.

2

There are 2 best solutions below

3
On BEST ANSWER

The rule for finding the remainder when dividing by $3$ is to sum up the digits and divide THAT number by $3$, the remainders will be the same. As $14!$ is divisible by $3$ the remainder should be zero, so $$8 + 7 + 1 + a + 8 + 2 + b + 1 + 2 = 29 + a + b$$ should be divisible by $3$. To make it easier we can take factors of $3$ out of the $29$ and conclude that $2 + a + b$ should be divisible by $3$.

The rule for remainders when dividing by $9$ is the same, sum up the digits and divide THAT by $9$. There's also a rule for $11$ involving the alternating sum of digits. All these give you equations like the one I got above. Try and write down those equations and see if you can do the last step of solving them on your own.

1
On

Using just mental arithmetic (while being very organized) you can write out

$\quad 14! = 10^2 \cdot 14 \cdot 13 \cdot 12 \cdot 11 \cdot 9 \cdot 8 \cdot 7 \cdot 6 \cdot 4 \cdot 3 =$
$\quad \quad 10^4 \cdot 14 \cdot 13 \cdot 12 \cdot 8 \cdot 7 \cdot 6 \cdot 4 \cdot 3 \,-$ $\quad \quad \quad \quad (10^4 \cdot 13 \cdot 12 \cdot 8 \cdot 6 \cdot 4 \cdot 3 - 10^4 \cdot 2 \cdot 13 \cdot 6 \cdot 4 \cdot 3 + 10^2 \cdot 2 \cdot 13 \cdot 4 \cdot 6 \cdot 4 \cdot 3)$

and thereby write

$\quad 14! -1200 =$
$\quad \quad 10^4 \cdot 14 \cdot 13 \cdot 12 \cdot 8 \cdot 7 \cdot 6 \cdot 4 \cdot 3 \,-$ $\quad \quad \quad \quad (10^4 \cdot 13 \cdot 12 \cdot 8 \cdot 6 \cdot 4 \cdot 3 - 10^4 \cdot 2 \cdot 13 \cdot 6 \cdot 4 \cdot 3 + 750000)$

Factoring out $10^4$ and applying $(\text{mod } 10)$ we have

$\quad \frac{14!-1200}{10^4} \equiv 4 \cdot 3 \cdot 2 \cdot 8 \cdot 7 \cdot 6 \cdot 4 \cdot 3 - 3 \cdot 2 \cdot 8 \cdot 6 \cdot 4 \cdot 3 + 2 \cdot 3 \cdot 6 \cdot 4 \cdot 3 +5 \pmod{10}$

or

$\quad \frac{14!-1200}{10^4} \equiv 9 \pmod{10}$

So $b = 9$ and we can now write

$\tag 1 14! = 871a8291200$

Applying $(\text{mod } 11)$ to $\text{(1)}$ we can use the alternating sum of the digits technique,

$\quad 0 \equiv 0 - 0 + 2 - 1 + 9 - 2 + 8 - a + 1 - 7 + 8 \equiv 7 - a \pmod{11}$

and we conclude that $a = 7$.


Another technique can be applied to get the value of $b$ - calculate, using recursion, $15!$ modulo $10^5$. This can be done from scratch and is not as difficult as it might appear (the computations simplify as you get zeroes on the far right of the decimal expansion).

If you are preparing for a test or contest you can jump start the calculation by committing to memory the following:

$\quad 10! \equiv 28800 \pmod{10^5}$

Continuing from here using $\text{modulo } 1000$ calculations,

$\quad 11 \times 288 \equiv 10 \times 288 + 288 \equiv 880 + 288 \equiv 168 \pmod {1000}$

$\quad 12 \times 168 \equiv 10 \times 168 + 336 \equiv 680 + 336 \equiv 016 \pmod {1000}$

$\quad 13 \times 016 \equiv 10 \times 016 + 048 \equiv 160 + 048 \equiv 208 \pmod {1000}$

$\quad 14 \times 208 \equiv 10 \times 208 + 832 \equiv 080 + 832 \equiv 912 \pmod {1000}$

So we conclude that

$\quad 14! \equiv 91200 \pmod{10^5}$