I recently got asked how to achieve a result of 100
only using the numbers {1,7,7,7,7}
(the number 1 can be used only once and the number 7 can be used four times at maximum so not every number have to be used) and the operations +, -, *, /
and also brackets. So I tried many different calculations and never got to 100
. Of course I cant try all the possible combinations so I thought I could use Mathematica to see wether this is possible or not. One idea would be to generate a set with all numbers (rather integers) we could get from all possible combinations and the other idea would be to find an explicit expression to calculate the result from the given numbers.
Examples:
7*7+7*7+1 = 99
7*(7+1)+7 = 63
7*(7+1)+7*7 = 105
((7 + 7)/7)*(7 + 1) = 16
7*7*(7/7 + 1) = 98
{1,7,7,7,7}
instead of{1,7}
to express that the number 1 can only be used once and the number 7 can be used four times. So 7*7+7*7+1+1 is not valid. $\endgroup$