4

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!

Culver Kwan
  • 2,795
  • 2
    what is your question? you didn't even write what one has to do. – Pink Panther Jul 05 '19 at 09:32
  • 6
    I wrote some Python that found the two prime solutions for MATHS to be 58129 and 62591, respectively giving $M=5,,A=8,,T=1,,H=2,,S=9,,P=4,,O=0,,I=6,,N=3$ and $M=6,,A=2,,T=5,,H=9,,S=1,,P=4,,O=3,,I=8,,N=7$. – J.G. Jul 05 '19 at 09:34
  • 1
    My previous treatment assumed $P\ne0$ so that POISON is a 6-digit number, but with your edit I'm unsure. The trouble is, MATHSISPOISON would be a 13-digit number, not a 12-digit number. – J.G. Jul 05 '19 at 09:38
  • 1
    O doesn't matter for the divisibility by 7 part SON-POI= S0N-P0N. –  Jul 06 '19 at 23:40
  • @RoddyMacPhee's nice observation applies equally to divisibility by $11$ and $13$, and may allow us to exclude candidate combinations quickly. But, with S the only common letter it looks like this is a job for a computer program. I'm prepared to be wrong about this, though :-) – Jyrki Lahtonen Aug 03 '19 at 11:11
  • S is irrelevant to MATHSISPOISON being divisible by 3 or not, as it shows up 3 times. –  Aug 03 '19 at 12:14

2 Answers2

3

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)$$

mathlove
  • 151,597
0

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

J.G.
  • 118,053