Jump to content
BrainDen.com - Brain Teasers
  • 0


bonanova
 Share

Question

Make 2 and 2 equal 5.

That is, create an expression whose result is 5, using common functions

and field operators, but only two constants, both of them 2.

Anything from simple addition to inverse hyperbolic arc-tangent is permissible.

Except: we do not allow round, floor or ceiling functions.

Also no variables.

So 2 - 2 + (x+x+x+x+x)/x is not allowed.

You may use 2 only twice.

So (2/2) + 2 + 2 is illegal.

Square root is OK.

Squaring is OK, but it costs you a 2.

No other powers can be used.

Enjoy. B))

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0

Using MS Excel

=odd(2)+2 the results is 5

Make 2 and 2 equal 5.

That is, create an expression whose result is 5, using common functions

and field operators, but only two constants, both of them 2.

Anything from simple addition to inverse hyperbolic arc-tangent is permissible.

Except: we do not allow round, floor or ceiling functions.

Using

Also no variables.

So 2 - 2 + (x+x+x+x+x)/x is not allowed.

You may use 2 only twice.

So (2/2) + 2 + 2 is illegal.

Square root is OK.

Squaring is OK, but it costs you a 2.

No other powers can be used.

Enjoy. B))

Link to comment
Share on other sites

  • 0

lb(2/(lb(sqrt(sqrt(sqrt(sqrt(2)))))))

where sqrt is the square root and

lb(2^x) = x

lb is the binary logarithm (or log base 2)

which I would say is fairly common in some fields, like information theory

Edited by mmiguel1
Link to comment
Share on other sites

  • 0

Nice. ;)

Especially mmiguel1's solution.

I was unaware of the lb notation; otherwise each log base 2 would cost a "2".

The Odd function smacks of floor ceiling and round functions and in spirit should be disallowed.

But in letter, it's fine.

++ obeys the OP which should have stressed mathematical [not programming] functions, but did not.

Follow on: Can it be done without [+, -, x, /] using a single instance of two functions?

f ( g ( 2 ) ) 2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...