# Only one such number exists

A 5 digit number ABCDE is divided by 2,3,4,5,6 and gives A,B,C,D,E as the remainders respectively.

Can you find the only possible number?

This was asked in my math exam, I think it would make a good puzzle.

• To avoid confusion, A,B,C,D,E are not necessarily distinct digits. And since they're remainders mod 2,3,4,5,6, (and easily shown to be non-zero), there aren't many possibilities for them at all.
– smci
Feb 27, 2022 at 0:58

$$11311$$.

Solution:

$$A$$ is nonzero and a remainder upon division by $$2$$. Thus $$A=1$$ and $$E$$ is odd.
Now suppose $$E=5$$. Then $$D=0$$ (by divisibility by $$5$$) and $$C=1$$ (by divisibility by $$4$$), but no $$B$$ work. Thus $$E \neq 5$$.
Then the remainder when divided by $$5$$ is simply $$E$$, since $$E < 5$$. So $$D=E$$. Since $$E$$ is odd, there are two cases.
If $$D=E=1$$, then $$\overline{ABCDE} = \overline{1BC11}$$, so $$C=3$$ by dividing by $$4$$. Only $$B=1$$ works, so the solution is $$\boxed{11311}$$.
If $$D=E=3$$, then $$\overline{ABCDE} = \overline{1BC33}$$, so $$C=1$$ by dividing by $$4$$. No $$B \in \{0, 1, 2\}$$ work, so there are no solutions here. We are done.

I got the same solution as @flame, but through a slightly different path.

$$A$$ must be $$1$$, as that is the only nonzero remainder$$\bmod 2$$. $$E$$, in turn, is one of $$1,3,5$$.
If $$E=5$$, then $$B$$ must be $$2$$, since $$5=2 \bmod 3$$. However, by the nature of our base ten number system, $$D=0$$ and $$C=1$$, but $$1+2+1+0+5 =9 = 0 \bmod 3$$, which does not equal $$2$$.
If $$E=3$$, then $$B$$ must be $$0$$, since $$3=0 \bmod 3$$. However, as above, $$D=3$$ and $$C=1$$, but $$1+0+1+3+3 = 7 = 1 \bmod 3$$, which does not equal $$0$$.
If $$E=1$$, then $$B$$ must be $$1$$, since $$1 = 1 \bmod 3$$. However, as above, $$D=1$$ and $$C=3$$, and $$1+1+3+1+1 = 7 = 1 \bmod 3$$, so the answer is $$11311$$!

Just for fun, I considered the cases where we let $$A = 0$$:

If $$A=0$$, then $$E$$ is one of $$0,2,4$$.
If $$E=4$$, then $$B$$ must be $$1$$. However, $$D=4$$ and $$C=0$$, but $$0+1+0+4+4 = 9 =0 \bmod 3$$, which does not equal $$1$$.
If $$E=2$$, then $$B$$ must be $$2$$. However, $$D=2$$ and $$C=2$$, and $$0+2+2+2+2 = 8 = 2 \bmod 3$$, so $$02222$$ works.
If $$E=0$$, then $$B$$ must be $$0$$. However, $$D=0$$ and $$C=0$$, and $$0+0+0+0+0 = 0 = 0 \bmod 3$$, so $$00000$$ works. Which of course it does, every digit's zero.

• I liked your A=0 part, I could have tweaked the question a bit to fit in "02222". Feb 27, 2022 at 5:51