$MATHS\times7=POISON$ where $MATHS$ is a prime

421 Views Asked by At

Today, when I was doing a past paper for my upcoming competition, I found a interesting but hard problem:

In the equation below, each letter represents distinct digits from $0$ to $9$. $$MATHS\times7=POISON$$Where the five-digit number $MATHS$ is prime.

Find all the possible values of the $13$-digit number $MATHSISPOISON$.

I only knew that S was $1,3,7$ or $9$.

Thank You!

2

There are 2 best solutions below

0
On BEST ANSWER

Since $1001=7\times 143$, multiplying the both sides of your equation $$\overline{MATHS}\times7=\overline{POISON}$$ by $143$, we get $$\overline{THS}\equiv \overline{SON}\times 143\pmod{1000}\tag1$$ Also, since we have $7\mid \overline{POISON}$ and $3\not\mid\overline{POISON}$, we get $$2P+I\equiv 2S+N\pmod 7\tag2$$ $$P+I\not\equiv O-S-N\pmod 3\tag3$$ Also, since $\overline{MATHS}$ is a five-digit number, we see that $P\le 6$ and that if $P=0$, then $O\ge 7$.

Here, let us separate it into four cases.


Case 1 : $(S,N)=(1,7)$

From $(1)$, we have $$\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline O&0&2&3&4&5&6&8&9\\ \hline T&3&1&5&0&4&8&7&1\\ \hline H&0&6&9&2&5&8&4&7 \\\hline \end{array}$$ implying $(O,T,H)=(3,5,9),(4,0,2)$.

If $(O,T,H)=(3,5,9)$, then from $(2)(3)$, we get $(P,I)=(4,8)$ and $\color{red}{62591\times 7=438137}$.

If $(O,T,H)=(4,0,2)$, then there is no $(P,I)$ satisfying $(2)(3)$.


Case 2 : $(S,N)=(3,1)$

From $(1)$, we have $$\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline O&0&2&4&5&6&7&8&9\\ \hline T&0&9&7&1&6&0&4&9\\ \hline H&4&0&6&9&2&5&8&1 \\\hline \end{array}$$ implying $(O,T,H)=(2,9,0),(4,7,6),(7,0,5)$.

If $(O,T,H)=(2,9,0)$, then from $(2)(3)$, we get $(P,I)=(5,4)$ and $7\color{green}4903\times 7=52\color{green}4321$.

If $(O,T,H)=(4,7,6)$, then there is no $(P,I)$ satisfying $(2)(3)$.

If $(O,T,H)=(7,0,5)$, then from $(2)(3)$, we get $(P,I)=(4,6),(6,2),(6,9)$ and $$\color{green}68053\times 7=47\color{green}6371,9\color{green}6053\times 7=\color{green}672371,\color{green}97053\times 7=67\color{green}9371$$


Case 3 : $(S,N)=(7,9)$

From $(1)$, we get $$\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline O&0&1&2&3&4&5&6&8\\ \hline T&3&8&2&6&1&5&9&8\\ \hline H&8&1&4&7&0&3&6&2 \\\hline \end{array}$$ implying $(O,T,H)=(0,3,8),(4,1,0)$.

If $(O,T,H)=(0,3,8)$, then from $(2)(3)$, we get $(P,I)=(2,5),(6,4)$ and $$\color{green}29387\times 7=\color{green}205709, \color{green}863\color{green}87\times 7=604709$$

If $(O,T,H)=(4,1,0)$, then from $(2)(3)$, we get $(P,I)=(2,5),(5,6)$ and $$3\color{green}5107\times 7=24\color{green}5749, \color{green}7810\color{green}7\times 7=546749$$


Case 4 : $(S,N)=(9,3)$

From $(1)$, we get $$\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|} \hline O&0&1&2&4&5&6&7&8\\ \hline T&1&5&9&8&2&7&1&5\\ \hline H&2&5&8&4&7&0&3&6 \\\hline \end{array}$$ implying $(O,T,H)=(0,1,2),(5,2,7),(6,7,0),(8,5,6)$.

If $(O,T,H)=(0,1,2)$, then from $(2)(3)$, we get $(P,I)=(4,6)$ and $\color{red}{58129\times 7=406903}$.

If $(O,T,H)=(5,2,7)$, then from $(2)(3)$, we get $(P,I)=(4,6)$ and $\color{green}65279\times 7=45\color{green}6953$.

If $(O,T,H)=(6,7,0)$, then there is no $(P,I)$ satisfying $(2)(3)$.

If $(O,T,H)=(8,5,6)$, then from $(2)(3)$, we get $(P,I)=(0,7)$ and $\color{red}{12569\times 7=087983}$.


Therefore, from the four cases above, we see that the answer is $$\color{red}{6259181438137}\ \ (62591\times 7=438137)$$ $$\color{red}{5812969406903}\ \ (58129\times 7=406903)$$ $$\color{red}{1256979087983}\ \ (12569\times 7=087983)$$

1
On

As @JyrkiLahtonen noted, this may be hard to solve without a computer. Running this Python script tells us there are three solutions if $P=0$ is allowed (otherwise, only the last two are):

maths = 12569, poison = 087983, mathsispoison = 1256979087983

maths = 58129, poison = 406903, mathsispoison = 5812969406903

maths = 62591, poison = 438137, mathsispoison = 6259181438137