10
$\begingroup$

Create an equation with the following conditions

  1. All numbers must be one or two digit prime numbers

  2. You can only use + and - and =
    No other math operators

  3. You must use all the nine (single) digits (1 to 9) but only once. No repeats of any digits.

No programming please.

$\endgroup$
3
  • 3
    $\begingroup$ If it works, it also works with only +'s or only -'s. $\endgroup$
    – Florian F
    Commented Oct 26, 2023 at 7:47
  • 4
    $\begingroup$ Nice puzzle! There are more than nine digits though :-) $\endgroup$
    – Bass
    Commented Oct 26, 2023 at 11:13
  • 1
    $\begingroup$ @Bass but you can't use zero. If it's the leading digit it's a no-op, if it's the last digit it's guaranteed not prime. You might get away with it if three digit numbers were allowed. $\endgroup$ Commented Oct 27, 2023 at 11:43

4 Answers 4

14
$\begingroup$

My answer (worked by hand):

$2 + 41 + 83 = 59 + 67$

Method:
The 4 can only be in 41, 43, 47
The 6 can only be in 61, 67
The 8 can only be in 83, 89

So just permuting those digit pairs by hand on paper, some sets duplicate the digits. In each set there are just a few digits left to organise.

It was just by trial and error with pencil and paper.
First I attempted to balance 4n + 6n = 8n + ?, but no combinations would balance off with the remaining digits.

Then I realised the 4n + 8n = 5n + 6n + ? might work, and it did.

$\endgroup$
11
$\begingroup$

Looking at the digits 4, 6 and 8 since primes cannot end with any of them so we must be using one prime number from each of these groups:
41, 43, 47
61, 67
83, 89

We can look at the remaining digits and try to form primes with them.
41, 67, 83, [2, 5, 9] -> 5 and 29 OR 2 and 59
41, 67, 89, [2, 3, 5] -> 5 and 23 OR 53 and 2
43, 61, 89, [2, 5, 7] -> NOT POSSIBLE
43, 67, 89, [1, 2, 5] -> NOT POSSIBLE
47, 61, 83, [2, 5, 9] -> 2 and 59 OR 5 and 29
47, 61, 89, [2, 3, 5] -> 2 and 53 OR 5 and 23

After that its easy to see that $41 + 83 - 67 = 59 - 2$ works

$\endgroup$
3
  • 1
    $\begingroup$ Just pipped you! $\endgroup$ Commented Oct 25, 2023 at 16:12
  • $\begingroup$ Not sure that "easy to see" is true. $\endgroup$ Commented Oct 27, 2023 at 5:16
  • 1
    $\begingroup$ It is possible to form primes in the third case: [2, 5, 7] -> 2, 5 and 7. $\endgroup$ Commented Oct 27, 2023 at 10:03
5
$\begingroup$

First off, you will need a minimum of three 2-digit numbers, because none of 1, 4, 6, 8, or 9 is prime, so they will need to be combined with another digit in order to make a prime number.

It quickly becomes evident that if there are three 2-digit numbers, it is impossible to combine them in such a way that they "cancel out", and allow an equation that works with the three much-smaller remaining digits.

Thus it is necessary to create four 2-digit numbers. These numbers will all necessarily be odd, since the only even prime is 2, which is a single digit.

The 2-digit primes can't end with 5, so the only ending digits available are 1, 3, 7, 9.

Any adding or subtracting of four odd numbers will always leave you with an even number, so the single-digit number must be 2.

Then it is just a matter of playing around with a few combinations of two-digit numbers that start with {4, 5, 6, 8} and end with {1, 3, 7, 9} to end up with:

$$67 + 59 - 83 - 41 = 2$$

$\endgroup$
3
  • $\begingroup$ What about the option of a pair of equals signs (if that still counts as AN equation)? $\endgroup$ Commented Oct 26, 2023 at 10:41
  • $\begingroup$ @JeopardyTempest the question specifically says "no programming" so a programming expression == doesn't feel like it qualifies. $\endgroup$ Commented Oct 27, 2023 at 5:15
  • 1
    $\begingroup$ @Mark no I mean like 1+ 2 = 3 = 7-4 (of course not aiming that at a valid solution, but just the idea that it's multiple equal statements, which doesn't seem to be programming) $\endgroup$ Commented Oct 27, 2023 at 8:09
5
$\begingroup$

Late, but without brute forcing combinations:

There are three primes of the form: 4x, 6y, 8z. These numbers can't be single digits and the number cannot end with any of those.

Now

There are 2,3,5,7 as the possible single-digit primes. We get to have 3 of them (1 and 9 are needed with those two-digit primes, along with another one; that another cannot be 2 or 5). Can we balance the equation? We get up to 14 (2+5+7) so 8x+14 is 103 at most, but 4x+6y is 104 at least. So, nope.

What about two equals signs?

There should be a single equation, so 4x+-sth = 6y +- sth = 8z +- sth. Here we hit the same issue, 4x+14 does not get you to 8z.

So, we use

4 two digit numbers. The problem with two equals signs is gaps above 10 between 4x, 6y and 8z, or 8z-4x and 6y (hoping 8z-4x matches the fourth two-digit number). These can't be covered by a single digit, making this class of solutions impossible. Thus, there is a simple equation with 4 two-digit numbers and remaining single digit.

We note

Single number is 2, for parity reasons. Number cannot end with 5. This means we get numbers of the form 4x, 5w, 6y, 8z. Assuming we use just +, we know the equation needs to be 4x+8z = 5w+6y with 2 on either side, anything else is obviously too large/small to balance. Thus, x+z + 10 = w+y, with 2 on either side. w is either 3 or 9 to make the number prime, while y can be 1 or 7. This means w needs to be 9 and y 7 to get the number high enough (x+z+10 is 14+). Now the right side is 16 and the left is 14, so we add 2 to the left one, ending up with the final unique solution 2+41+83 = 59+67.

$\endgroup$
1
  • $\begingroup$ Excellent Analysis! $\endgroup$
    – RogerA
    Commented Oct 26, 2023 at 12:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.