How many such three digit numbers are possible?

Certain $3$-digit numbers have the following characteristics:

1. all three digits are different

2. the number is divisible by $7$

3. the number on reversing the digits is also divisible by $7$

How many such numbers are there? I have tried using a brute force approach and found $168$ and $259$. Is there a better way to solve these questions?

• Surely, by saying $168$ and $259$ are solutions, then we can imply that $861$ and $952$ are also solutions – lioness99a Jul 6 '17 at 11:02
• @K Vinod Kumar: What is the purpose of having tags like (mathematica) and (mathematicians)? You may delete these misleading and uninformative tags. – P Vanchinathan Jul 7 '17 at 5:04

If the number is $10^2a+10b+c$ as digits then considering $(10^2a+10b+c) - (10^2c+10b+a)$ leads to realising $99(a-c)$ must be divisible by $7$ and cannot be zero and, since $99$ is coprime to $7$.

• $1b8$ but $108 \equiv 3 \pmod 7$ requiring $10b \equiv 4 \pmod 7$ making the only possible value of $b=6$, which is neither $1$ nor $8$ $\checkmark$
• $2b9$ but $209 \equiv 6 \pmod 7$ requiring $10b \equiv 1 \pmod 7$ making the only possible value of $b=5$, which is neither $2$ nor $9$ $\checkmark$
• $7b0$ but $700 \equiv 0 \pmod 7$ requiring $10b \equiv 0 \pmod 7$ making the only possible values of $b=0$ or $7$, which are either $7$ or $0$ $\times$
• $8b1$ but $801 \equiv 3 \pmod 7$ requiring $10b \equiv 4 \pmod 7$ making the only possible value of $b=6$, which is neither $8$ nor $1$ $\checkmark$
• $9b2$ but $902 \equiv 6 \pmod 7$ requiring $10b \equiv 1 \pmod 7$ making the only possible value of $b=5$, which is neither $9$ nor $2$ $\checkmark$

So the possible solutions are $168, 259, 861, 952$

• Thank you so much @Henry.. :) – læran91 Jul 6 '17 at 14:17

Let \begin{align} N_1 &= 10^{2}a+10b+c \\ N_2 &= 10^{2}c + 10b +a \end{align} Whence \begin{align} N_1-N_2 &= 100a-100c+10b-10b+c-a \\ &= 100(a-c)+(a-c) \\ &= 99(a-c) \end{align} Thus the difference between your two numbers should also be divisible by $9$.

• You have shown that the difference between any three digit number and its reversal is divisible by $9$, but this does not help reduce the possibilities – Henry Jul 6 '17 at 11:22
• @Henry But doesn't it rather strengthen the case via another constraint? – Kevin Jul 6 '17 at 11:28

We can say that the number has distinct digits $a,b,c$ and then we can write it as $$10^2a+10b+c$$

Now we have \begin{align}\left(10^2 a+10 b+c\right)\mod 7&\equiv 0\tag{1}\\ \left(10^2 c+10 b+a\right)\mod 7&\equiv 0\tag{2}\end{align}

Now we consider $(2)-(1)$:

\begin{align}\left(10^2 c+10 b+a\right)-\left(10^2 a+10 b+c\right)&=10^2(c-a)+10(b-b)+(a-c)\\ &=10^2(c-a)-(c-a)\\ &=99(c-a)\end{align}

Can you continue from here?

• I misinterpreted the question at first, +1. Please note that $a \neq b \neq c$ does not imply that $a \neq c$. – jvdhooft Jul 6 '17 at 11:06
• Yeah i got that but here we have to find how any such numbers are there. Not the number is divisible by 7 or not. Can you elaborate little more – læran91 Jul 6 '17 at 11:23