TITLE: If $17! = 355687\underline{ab}8096000$. Then value of $(a,b)$ is
QUESTION [13 upvotes]: If $17! = 355687\underline{ab}8096000$, what is the value of $(a,b)$?
If $34! = 295232799\underline{cd}9604140847618609643\underline{ab}0000000$, what is the value of $(a,b,c,d)$?


My Attempt:
We know that
$$
17! = 1\times 2 \times 3 \times 4 \times 5\times 6\times 7\times 8 \times 9\times 10 \times 11\times 12\times 13\times 14\times 15\times 16\times 17
$$
Thus the RHS must  be divisible by $3$,$7$, or $11$.
Step 1: Divisibility by $3$
We know that for some $K\in\mathbb{N}$
$$
\begin{align}
K&=\frac{3+5+5+6+8+7+a+b+8+0+9+6+0+0+0}{3}\\
&=\frac{57+a+b}{3}\\
&= 19+\frac{a+b}{3}
\end{align}
$$
Therefore, $0\leq a+b\leq 18$, which implies that $(a+b) \in\{0,3,6,9,12,15,18\}$.
Step 2: Divisibility by $11$
We know that for some $L\in\mathbb{N}$
$$
\begin{align}
L&=\frac{(3+5+8+a+8+9+0+0)-(5+6+7+b+0+6+0)}{11}\\
&=\frac{9+a-b}{11}\\
\end{align}
$$
This implies that $a-b=2$ or $b-a=9$, and thus we have to solve for $a-b = 2$ and $(a+b) \in\{6,12\}$. Therefore $(a,b) \in\lbrace{(4,2),(7,5)\rbrace}$. Again we have to solve for $b-a=9$ and $b+a\in\{3,9\}$, giving $(a,b)\in\{ (3,6),(0,9)\}$.
So we end up with $(a,b) \in\{(4,2),(7,5),(0,9)\}$. But answer given is $(a,b) = (4,2)$. What did I do wrong?

REPLY [5 votes]: To avoid unanswered questions, I will compile the tips from the comments here, along with a bit more.
Instead of using divisibility by $3$, use divisibility by $9,$ so that we can actually conclude that $\frac{57+a+b}{9}=6+\frac{3+a+b}9$ is an integer. Since $0\le a+b\le 18,$ then it follows that either $a+b=6$ or $a+b=15$.
As with your work, we can also conclude that $a-b=2$ or $b-a=9$. The latter, though, is impossible, since $b\le 9$ and $a\ge 0,$ so that $b-a=9$ if and only if $b=9$ and $a=0,$ in which case, $a+b\ne 6,15.$ Therefore, we have $a-b=2.$ Since $2a=(a+b)+(a-b)=a+b+2,$ then $2a=8$ or $2a=17,$ but the latter is clearly false, since $a$ is an integer. Thus, $a=4,$ so since $a-b=2,$ then solving the system gives us $(a,b)=(4,2).$
Your second question was previously answered here. Calvin Lin's answer, in particular, seems very accessible.