1

I had a test yesterday, and there was a problem that I found hard to solve. Here it is :

A number N contains only the digit 5 and it is exactly divisible by 373. Then the remainder when N/373 is divided by 10000 is:A) 2535, B) 5235, C) 5325, D) 3525

I don't know where to begin with, except that we can start be taking the $\frac{N}{373}$ as $5x$ (since $N$ should be divisible by $5$ as it contains only the digit $5$ in every place).

Any help is appreciated.

Bill Dubuque
  • 272,048
Spectre
  • 1,573

2 Answers2

4

Arnaud's suggestion in the comments is a natural one but because there are only four options there's actually a much easier option: we can just multiply $373$ by each of the options and check which ones have last four digits $5555$. Hopefully a unique one will have this property and then this must be the answer.

As it happens, $373 \cdot 2535 = 945555$ and none of the other three end in $5555$, so the answer is $\boxed{ A }$. This is sort of a mean question to ask without any kind of introduction to modular arithmetic, though.


With a little bit of modular arithmetic we can reduce the amount of work we need to do (if we really want to avoid multiplying a $3$-digit number by a $4$-digit number four times, which honestly is not so bad) although it requires being clever about what modular computations to do. We want to check which of the four numbers satisfies $373x \equiv 5555 \bmod 10000$. Clearly $x$ must be divisible by $5$ but not by $25$ which already rules out $C$ and $D$, so only $A$ and $B$ are left. Dividing by $5$ gives

$$373y \equiv 1111 \bmod 2000$$

where $y = \frac{x}{5}$ is either $\frac{2535}{5} = 507$ or $\frac{5235}{5} = 1407$. The two possibilities differ by $900$ which means they differ $\bmod 8$ and $\bmod 125$ (thinking in terms of the Chinese remainder theorem), so checking either of these will uniquely determine the answer. Working $\bmod 8$ gives

$$373y \equiv 13y \equiv -3y \equiv 1111 \equiv -9 \bmod 8$$

which gives $y \equiv 3 \bmod 8$, and on the other hand $507 \equiv 27 \equiv 3 \bmod 8$ and $1407 \equiv 207 \equiv 47 \equiv -1 \bmod 8$ so again the answer is $\boxed{ A }$ (and actually we don't need to do the computation for $1407$, if we are really optimizing for time).


To make things a bit harder, suppose we're guaranteed that the answer is unique (that is, that there's a unique possible remainder - this isn't entirely obvious) but not given any options for what it is. We can compute it by solving $373x \equiv 5555 \bmod 10000$. As above we'll begin by dividing by $5$ and solving

$$373y \equiv 1111 \bmod 2000$$

and using CRT we'll solve this by solving it $\bmod 16$ and $\bmod 125$. Working $\bmod 16$ we have

$$373y \equiv 53y \equiv 5y \equiv 1111 \equiv -89 \equiv 25 \bmod 16$$

which gives $y \equiv 5 \bmod 16$. Working $\bmod 125$ we have

$$373y \equiv -2y \equiv 1111 \equiv -14 \bmod 125$$

which gives $y \equiv 7 \bmod 125$. So we write $y = 7 + 125k$ and try to find $k$ such that

$$y \equiv 7 + 125k \equiv -1 - 3k \equiv 3 \bmod 16$$

which gives $3k \equiv 12 \bmod 16$, hence $k \equiv 4 \bmod 16$, so

$$y = 7 + 125 \cdot 4 = 507$$

which gives

$$x = 5y = \boxed{ 2535 }.$$

After having done this it looks like $373$ was chosen specifically to make this computation easier so this might've been the intended solution.

Qiaochu Yuan
  • 419,620
  • That's fine if you don't need a proof but just to check the correct box. – Arnaud Oct 05 '20 at 09:16
  • 2
    Oh I see : mathematical proofs are not really the focus of math studies on in 10th grade, so that's what they are supposed to do. – Arnaud Oct 05 '20 at 09:18
  • 1
    And... This assumes that there is a correct box (it could still be "none of the above") – Arnaud Oct 05 '20 at 09:20
  • Maybe , @Arnaud ... but this is from a screening test at an entrance coaching centre – Spectre Oct 05 '20 at 09:22
  • @Spectre This would have helped if you had specified all this in the question. – Arnaud Oct 05 '20 at 09:23
  • Maybe.. but still I believe there is something subtle that we must gauge out before attempting the question. – Spectre Oct 05 '20 at 09:25
  • I didn't mean that I don't understand modular arithmetic... I can perhaps understand a bit of it.. That might suffice. – Spectre Oct 05 '20 at 09:26
2

$\!\begin{align}\text {An easy way:}\ \ \dfrac{N}{373}\, =\, \dfrac{55\cdots 55}{373} &= \ r\ +\ 10000\:\!q,\ \ r = {\rm remainder} \bmod 10000\\[.2em] \iff 55\cdots55 \,&=\, 373r + 10000(373q)\\[.2em] \Longrightarrow\qquad\quad\ \ \color{#c00}3\,&\equiv\, \color{#0a0}{5r}\!\! \pmod{\!8} \end{align}$

$\!\begin{align}\text{Checking listed $r$ choices}, \, \bmod 8\!:\, \ \color{#0a0}{ 5r} \equiv 5\cdot\:\! &\{\color{#90f}{2535}, 5235, 5325, 3525\} \\ \equiv\ &\{\color{#c00}3,\ \ \ \ \ \ 7,\ \ \ \ \ \ \ \ \ \ \ \ 1,\ \ \ \ \ \ 1\}\end{align}$

Therefore the only valid choice for $\,r\,$ is: $\,{\rm (A)} = \color{#90f}{2535}.\,$ Took a minute of trivial mental arithmetic..

Bill Dubuque
  • 272,048
  • For the record: this was posted before Qiaochu posted his edit with the second (computational) part of his answer (so any overlap was not there when it was posted). – Bill Dubuque Oct 05 '20 at 09:43
  • I didn't understand that "check for mod 8" part, @BillDubuque – Spectre Oct 05 '20 at 09:47
  • @Spectre Reduce the prior equation $!\bmod 8,$ using: $,1000\equiv 0 \Rightarrow, 55\cdots55\equiv 555\equiv \color{#c00}3,,$ and $, 373\equiv 5,$ to get $, 3\equiv 5r\pmod{8},,$ so our remainder $,r,$ must satisfy that congruence, which we check for all listed choices of $r\ \ $ – Bill Dubuque Oct 05 '20 at 09:54
  • You mean, which of the numbers leave remainder $3$ on division with $8$ ? – Spectre Oct 05 '20 at 09:58
  • @Spectre Exactly – Bill Dubuque Oct 05 '20 at 09:59
  • Ok, @BillDubuque , and how you felt that checking for the number $ \mod 8$ is that a number with recurring number of $5$'s in it (eg. 555,555555,etc) leave remainder $3$ on division with $8$, I guess... – Spectre Oct 05 '20 at 10:04
  • @Spectre It's a generalization of a parity check. When we have a congruence modulo an even number (here $10000$) the congruence persists $!\bmod 2$, because congruences persist mod factors of the modulus. Here parity doesn't suffice to identify the correct choice of root $,r,$ because all choices have the same (odd) parity. But our modulus $10^{\large 4}$ is divisible by $2^{\large 4}$ so we can use "higher" parity, checking it mod $,4,8,\ldots.,$ Doing so, $\bmod 4,$ doesn't give a unique choice, but $!\bmod 8,$ does, as above. – Bill Dubuque Oct 05 '20 at 10:29