1. If $17! = 355687\underline{ab}8096000$, what is the value of $(a,b)$?

  2. 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?

  • 2
    $\begingroup$ Instead of divisibility by 3 you should use divisibility by 9, which works the same way. $\endgroup$ – vadim123 Oct 10 '13 at 16:17
  • 1
    $\begingroup$ $b-a=9$ if an only if $b=9$ and $a=0$. How can you allow $(a,b)=(3,6)$? $\endgroup$ – Thomas Andrews Oct 10 '13 at 16:19
  • 2
    $\begingroup$ Another observation: Since $17 > 13$, $17!$ must be divisible by $7\cdot 11\cdot13 = 1001$. Divisibility by $1001$ can be quickly determined, analogously with divisibility by $11$, by alternately adding and subtracting three-digit groups, starting from the last three: i.e., $000-096+ab8-687+355$. That result must be divisible by $1001$ for the whole number to be. We get $355-687-96 = -428$, so $ab8 = 428$. $\endgroup$ – Brian Tung Aug 21 '15 at 19:23
  • $\begingroup$ The divisibly role of 3 may not help but divisibly role of 9 helps. $\endgroup$ – Taha Akbari Jun 18 '16 at 5:13

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.

  • 1
    $\begingroup$ Rather than the slightly tricky "$a,b$ are either both odd, or both even", why not proceed directly to solving the system: adding $a+b = (6\text{ or }15)$ and $a-b=2$ gives $2a = (8\text{ or }17)$ and so immediately $a=4$. $\endgroup$ – MJD Oct 10 '13 at 17:37
  • $\begingroup$ Yeah, I like that better. $\endgroup$ – Cameron Buie Oct 10 '13 at 19:43
  • 1
    $\begingroup$ @MJD: Yes, I really did like that better. I'm not sure why I didn't fix that right away, but it's fixed now. :-P $\endgroup$ – Cameron Buie Apr 18 '17 at 23:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.