# need help with a math equation puzzle [closed]

I'm trying to create a math equasion puzzle using the numbers 3, 7, 20 and 40. I want to end with an answer of either 7 or 40. Is there any way this can be done?

Thanks for the help

If I understand your question correctly, you just want to combine the numbers 3, 7, 20 and 40 with arithmetic operations to get 7 and/or 40: $$(3 \times 7 - 20) \times 40 = 40\\ (3 - 40 \div 20) \times 7 = 7$$

• that's perfect, and exactly what I was looking for. thank you Jan 26, 2015 at 18:02
• i'm so sorry, but I can't get the second version to come out to 7. I'm getting 12.95 Did I do that right? Jan 26, 2015 at 18:08
• @Kristen: division before subtraction. 40 / 20 = 2 hence (3-2)=1 hence 1x7 = 7. Jan 26, 2015 at 18:17

I wrote a script to go through all possible equations using +, -, /, *. Here is the output:

7

7 * (3 - (40 / 20))
(3 - (40 / 20)) * 7
7 / (3 - (40 / 20))

40

40 * ((3 * 7) - 20)
40 * ((7 * 3) - 20)
((3 * 7) - 20) * 40
((7 * 3) - 20) * 40
(20 * (7 - 3)) - 40
((7 - 3) * 20) - 40
40 / ((3 * 7) - 20)
40 / ((7 * 3) - 20)


... Although most of these are trivial rearrangements of earlier ones. The ones I consider "unique" are:

$$7 \times (3 - (40 \div 20)) = 7\\ 7 \div (3 - (40 \div 20)) = 7\\ ((7 - 3) \times 20) - 40 = 40\\ 40 \times ((3 \times 7) - 20) = 40\\ 40 \div ((3 \times 7) - 20) = 40$$

• I guess I really only found one answer that theosza didn't already mention, if you consider dividing by one trivially similar to multiplying by one. Still, it's interesting to know that no other solutions exist (if my script contains no bugs). Jan 26, 2015 at 18:47