# Find the missing digits in the expansion of $34!$ [duplicate]

If $34!=\overline{295232799cd96041408476186096435ab000000}$ then find the value of $a,b,c$ and $d.$

My Attempt: I can find that $b=0$ because it has seven five integers.

$\lfloor{\frac{34}{5}}\rfloor+\lfloor{\frac{34}{25}}\rfloor=6+1=7$

Also I think $a$ can be found using divisibility rule of $8$ that means $\overline{35a}$ is divisible by $8$ which gives us $a=2$. But I'm stuck in finding $c$ and $d$. Using the divisibility rule of $9$ I get an equation. And using divisibility rule of $11$ I get another equation but when I solve them I get two values for $c$ and $d$.

Note: calculator is not allowed.

## marked as duplicate by Martin Sleziak, Qwerty, Ivan Neretin, Did, S.C.B.Aug 15 '16 at 10:24

• Use all the divisibility rules. You know that the sum of the digits must be divisible by $9$. Look up for the other ones. – E. Joseph May 28 '16 at 8:40
• I tried all of them but I cant slove – Taha Akbari May 28 '16 at 8:46
• This is BMO 2002 Round 1 Problem 1 – punctured dusk May 28 '16 at 10:10
• Yes you are right what shhoud I do with the question now????????????? – Taha Akbari May 28 '16 at 11:11
• Your question has been put on hold, probably because some people thought it lacks motivation or that it does not appear interesting content for this site, to them. By giving some more context, the question might be re-opened. Though probably it would be closed as a duplicate immediately after. If you're happy with the answers in the question I linked to, you don't have to do anything. – punctured dusk May 28 '16 at 12:38

$34! = 295232799cd96041408476186096435ab000000$

$\left \lfloor \dfrac{34}{5} \right \rfloor = 6$

$\left \lfloor \dfrac{6}{5} \right \rfloor = 1$

So there are $6+1 = 7$ zeros at the end of $34!$. Hence $$\color{red}{b = 0}$$

THEOREM: Compute the following

• $N = 5q_1 + R_1$

• $q_1 = 5q_2 + R_2$

• $q_2 = 5q_3 + R_3$

• ...

• $q_{n-1} = 5q_n + R_n$

where $0 \le R_i < 5$ for all $i$ and $0 \le q_n < 5$.

Then the first non zero digit in $N!$ is

$U(N!) = 2^P \times Q! \times R_1! \times R_2! \times R_3! \dots \times R_n! \pmod{10}$

Where

• $P = q_1 + q_2 + \cdots + q_n$
• $Q = q_n$

We compute \begin{align} 34 &= 5(6) + 4 \\ 6 &= 5(1) + 1 \\ 1 &= 5(0) + 1 \\ \end{align}

$P = 6 + 1 = 7$

$Q = 0$

\begin{align} U(34!) &= 2^7 \times 0! \times 4! \times 1! \times 1! \pmod{10} \\ &= 8 \times 0! \times 4 \times 1! \times 1! \pmod{10} \\ &= 2 \end{align}

So $$\color{red}{a = 2}$$

$34! = 2\; 95\; 23\; 27\; 99\; \color{red}{cd}\; 96\; 04\; 14\; 08\; 47\; 61\; 86\; 09\; 64\; 35\; 20\; 00\; 00\; 00$

Clearly $99 \mid 34!$ So, when we cast out $99's$, we should get $0$. Pairing off the numbers in $34!$ from right to left, skipping $cd$, and adding modulo $99$, we get

$2 + 95 + 23 + 27 + 99 + 96 + 04 + 14 + 08 + 47 + 61 + 86 + 09 + 64 + 35 + 20 + 00 + 00 + 00 \pmod{99} = 96$

So $cd = 99 - 96 = 03$

Hence

$$\color{red}{c = 0}$$

$$\color{red}{d = 3}$$

This is a partial solution...

Use all the divisibility rules.

But first, you can notice that $32!=2^31\times5^7\times\cdots$, so there are $7$ zeros at the end of the number. So $b=0$, and $a\ne 0$.

$34!$ is divisible by $9$, so:

$$4+a+c+d=0\pmod 9.$$

It's divisible by $7$, so:

$$000-000+5a0-643+609-618+847-140+604-cd9+799+327-952+2=0\pmod 7,$$

so

$$835+5a0-cd9=0\pmod 7.$$

It's divisible by $11$, so:

$$2-2+5-2+9-7+2-3+9-9+7-9+d-c+4-0+6-0+4-1+7-4+1-7+4-8+8-1+6-9+0-6+3-4+6-0+a-5=0\pmod {11},$$

so

$$6+a-c+d=0\pmod {11}.$$

It's also divisible by $13$, so you can look at the alternate sum of three digits from the left.

And so on...

$34!=295232799039604140847618609643520000000$.
Therefore $a=2, b=0, c=0, d=3$.