-10
$\begingroup$

Is it mathematically possible to show by some creative way that when you combine the digits 5, 4, 3, 2, 1 in that order using operators (+, -, x, integer division/ floating point division(//) or modulus(%)) that you will or will not get the number 39?

By adding other operators it's possible:

  • Borrowing a principle from computer science called concatenation: (5 cat 4) = 54 / 3 = 18 + (2 cat 1) = 21 gives you 39.
  • Inverse exponentiation (eg. 4 inv exp with 2 is the square root of 4=2): A solution comes up 4^3=64 inv exp with 2 gives you 8. 5*8 = 40-1 = 39
$\endgroup$
5
  • 3
    $\begingroup$ Hi! What's "integer division" as opposed to "division"? Does it mean 3/2 = 1 (i.e. ignore the remainder)? $\endgroup$
    – msh210
    Commented Jul 14 at 12:36
  • $\begingroup$ Did you come up with this puzzle yourself? $\endgroup$
    – bobble
    Commented Jul 14 at 14:17
  • $\begingroup$ yeah msh210 you are right $\endgroup$
    – alex
    Commented Jul 14 at 17:11
  • $\begingroup$ I modified an existing puzzle $\endgroup$
    – alex
    Commented Jul 14 at 17:12
  • $\begingroup$ Why are there so many downvotes? $\endgroup$ Commented Jul 18 at 0:20

2 Answers 2

0
$\begingroup$

If allowed to use the factorial operator:

$(5 * 4! - 3) / (2 + 1)$

If allowed to use the $\sqrt{x}$ operator:

$(5 * \sqrt{4} + 3) * (2 + 1)$

I couldn't find a way to do it with just + - * / %.

$\endgroup$
1
  • $\begingroup$ Thanks a lot for the lucid answer @JS1 $\endgroup$
    – alex
    Commented Jul 14 at 20:08
9
$\begingroup$

Depending on what the meaning of division is:

regular division

5 x 43/2 - 1

or

division rounds down

5 x -4 x (-3/2) - 1

$\endgroup$
12
  • 2
    $\begingroup$ @alex The second answer is perfectly fine, since -1.5 rounded down (i.e. in the negative direction on the number line) becomes -2. The first answer is not quite a copy of yours since it uses division (in the exponent) and not the "inverse exponentiation" operation, but since you removed exponentiation from the list of allowed operations, it is no longer a valid solution regardless. $\endgroup$ Commented Jul 14 at 19:07
  • 2
    $\begingroup$ @alex please do not SHOUT. They have not "literally copied your answer". You haven't posted an answer, except to show how it can be done with different rules. $\endgroup$ Commented Jul 14 at 19:55
  • 2
    $\begingroup$ Excuse me, I can't see this in your question. It is not LITERALLY COPIED. And as explained the second is not wrong. $\endgroup$ Commented Jul 14 at 19:58
  • 2
    $\begingroup$ The question has become a 'shifting sand' question, having removed exponentiation since this answer was posted. $\endgroup$ Commented Jul 14 at 20:04
  • 3
    $\begingroup$ @alex You described a solution involving exponentiation and the extra operation of inverse exponentiation. The above answer shows that the inverse exponentiation operation is not needed in the set of rules because you can simply use division instead. You then removed exponentiation altogether, invalidating this answer. I find it a bit strange that you then accept the other answer that also includes various other operations that you did not ask for. $\endgroup$ Commented Jul 14 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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