Here is a question which is really troublesome:

Let N be a 2 digit prime number. When the digits are interchanged we get another prime number M.

If M + N =176, find N-M.

  • $\begingroup$ How have you tried to tackle this? Can you please show some working and where you are stuck. $\endgroup$
    – EHH
    Apr 15, 2016 at 8:39
  • 1
    $\begingroup$ Why is it troublesome? Put $N=10a+b$. Hence find $a+b$. Note that given the constraints $1\le a\le 9$ and $1\le b\le 9$ there is only one solution with $a>b$. $\endgroup$
    – almagest
    Apr 15, 2016 at 8:40
  • $\begingroup$ $97-79=18$...... or $79-97=-18$ $\endgroup$ Apr 15, 2016 at 8:41
  • $\begingroup$ 176 is pretty high: if you subtract 9x you then get something that is either 8y (which we rule out because y8 is not prime) or 7y, which means 97 and 79. Now you're left to verify the sum and test the primeness. $\endgroup$
    – polettix
    Apr 15, 2016 at 8:47

1 Answer 1


Wlog, assume $N\geq M$

then $198\geq 2N\geq 176$

$99\geq N\geq 88$

Then it is easy to find out the value of $N$ by listing the prime numbers between the range


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .