# For what x can we solve $1,2,3,x=5$

This is a variation on the formation of numbers theme.

Given $$1, 2, 3, x$$ in order, and the operations plus, minus, times, divide, and brackets, what single digits can x NOT be?

i.e. find a solution for $$x$$ from $$0$$ to $$9$$, or prove there is no solution.

For example if $$x=4$$ we have:

$$(1+2)\times3-4=5$$

It is possible for x = {0-9}.

$$X=0: \;\;1 \times 2 + 3 + 0 = 5$$
$$X=1: \;\;1 \times 2 \times3 - 1 = 5$$
$$X=2: \;\;1 + 2 \times 3 - 2 = 5$$
$$X=3: \;\;1 - 2 + 3 + 3 = 5$$
$$X=4: \;\;(1 + 2) \times 3 - 4 = 5$$
$$X=5: \;\;(1 + 2) / 3 \times 5 = 5$$
$$X=6: \;\;1 + 2 / 3 \times 6 = 5$$
$$X=7: \;\;1 / 2 \times (3 + 7) = 5$$
$$X=8: \;\;(1 - 2) \times 3 + 8 = 5$$
$$X=9: \;\;1 - 2 - 3 + 9 = 5$$

• they have to be in order
– JMP
Mar 9, 2019 at 5:12
• and done! Here you go! Mar 9, 2019 at 5:20
• I don't think negation is allowed. A subtraction (minus) operation requires two operands. Mar 9, 2019 at 5:29
• Not sure if it was required, but answer has since been fixed to remove negation. Mar 9, 2019 at 5:53
• You don't need the brackets in lines X=1 and X=2. Mar 9, 2019 at 10:50

Other solutions:

$$X=1:\;\;1+2+3-1=5$$
$$X=1:\;\;(1\times2+3)\times1=5$$
$$X=1:\;\;1\times2+3\times1=5$$