# Use five 5s to make 37

Jason Menard

Sheriff

Posts: 6450

posted 13 years ago

Fill in the operators for the following equation. You may use any operators you wish. There should be at least two different ways to solve this equation.

5 5 5 5 5 = 37

[Note: The solution to the equation is 37. As such, you may not split up the '3' and the '7' by placing any operators in between them.]

[ July 20, 2003: Message edited by: Jason Menard ]

5 5 5 5 5 = 37

[Note: The solution to the equation is 37. As such, you may not split up the '3' and the '7' by placing any operators in between them.]

[ July 20, 2003: Message edited by: Jason Menard ]

Roy Tock

Ranch Hand

Posts: 83

posted 13 years ago

Let I be the set of integers. Define an operation op on IxIxIxIxI such that op(5, 5, 5, 5, 5) = 37. Then

op(5, 5, 5, 5, 5) = 37. QED :-)

Here's another that's more likely to be among Jason's solutions, assuming base ten arithmetic:

((55)/5)+5+5=(3*7)

Another is

5+5+((55)/5)=(3*7)

A third is

5+((55)/5)+5=(3*7)

Those three are all basically the same, though. Maybe there's another? Neat...I wasn't thinking about 3*7 at first.

op(5, 5, 5, 5, 5) = 37. QED :-)

Here's another that's more likely to be among Jason's solutions, assuming base ten arithmetic:

((55)/5)+5+5=(3*7)

Another is

5+5+((55)/5)=(3*7)

A third is

5+((55)/5)+5=(3*7)

Those three are all basically the same, though. Maybe there's another? Neat...I wasn't thinking about 3*7 at first.

Bert Bates

author

Sheriff

Sheriff

Posts: 8900

5

Kao-Wei Wan

Greenhorn

Posts: 7

Jignesh Malavia

Author

Ranch Hand

Ranch Hand

Posts: 81

Jason Menard

Sheriff

Posts: 6450

posted 13 years ago

2^5 won't work because there is no 2, and '^' is used in programming languages as an exponent operator, but isn't a

[ July 20, 2003: Message edited by: Jason Menard ]

Originally posted by Jignesh Malavia:

hints

a) 2^5=32 (if power is allowed)

b) 1<<5=32 and 5|5=5

2^5 won't work because there is no 2, and '^' is used in programming languages as an exponent operator, but isn't a

*real*math operator. Even if it were to be used, then you could get something like 5^5. but not 2^5. Bit shifting, while being a Java operator, is also not a math operator in the true sense of the word (human beings have no need to bit encode digits to manipulate them, that's a computer thing). You're best bet would be to stick with the normal mathematical operators imho.

[ July 20, 2003: Message edited by: Jason Menard ]

Mark Herschberg

Sheriff

Posts: 6037

posted 13 years ago

Which of the following is allowed:

1) Factorial

Most problems of this nature do accept ! as a valid mathematical symbol.

2) Summation

Some accept this, some do not. Those who do not argue that you need two numbers to define a summation. Those who do, allow a single number, with the terminal base to be implied as zero.

3) (Square) Roots

Are square roots allowed? Are other roots? A root sign typically has a a number associated with it. Some allow for a root sign sans number to imply a square root.

4) Rounding, Flooring, trig functions, etc

Can we allow other functions which are typically represented by alphabetic symbols?

--Mark

1) Factorial

Most problems of this nature do accept ! as a valid mathematical symbol.

2) Summation

Some accept this, some do not. Those who do not argue that you need two numbers to define a summation. Those who do, allow a single number, with the terminal base to be implied as zero.

3) (Square) Roots

Are square roots allowed? Are other roots? A root sign typically has a a number associated with it. Some allow for a root sign sans number to imply a square root.

4) Rounding, Flooring, trig functions, etc

Can we allow other functions which are typically represented by alphabetic symbols?

--Mark

Jignesh Malavia

Author

Ranch Hand

Ranch Hand

Posts: 81

posted 13 years ago

2^5 won't work because there is no 2

Yes, but we can get one using (5+5)/5

Even if it were to be used, then you could get something like 5^5. but not 2^5.

(((5+5)/5)^5)+5 = 37

Bit shifting, while being a Java operator, is also not a math operator in the true sense of the word (human beings have no need to bit encode digits to manipulate them, that's a computer thing).

Well, okay. If it were allowed, my answer was ((5/5)<<5)|5|5

You're best bet would be to stick with the normal mathematical operators imho.

So is factorial (!) allowed? In that case Michael Dunn was pretty close.

(5 x 5) + 5! - (5!/5)

(5 * 5) + (5! / (5+5))

Originally posted by Jason Menard:

2^5 won't work because there is no 2

Yes, but we can get one using (5+5)/5

Even if it were to be used, then you could get something like 5^5. but not 2^5.

(((5+5)/5)^5)+5 = 37

Bit shifting, while being a Java operator, is also not a math operator in the true sense of the word (human beings have no need to bit encode digits to manipulate them, that's a computer thing).

Well, okay. If it were allowed, my answer was ((5/5)<<5)|5|5

You're best bet would be to stick with the normal mathematical operators imho.

So is factorial (!) allowed? In that case Michael Dunn was pretty close.

(5 x 5) + 5! - (5!/5)

(5 * 5) + (5! / (5+5))

Jason Menard

Sheriff

Posts: 6450

posted 13 years ago

I'm sure this works better in a non-programmer crowd.

The solutions I have seen maybe (or maybe not) use the following math operators: (,),+,-,*,/,!. (<-- that's a period, not a decimal point) It is also acceptable to run numbers together, so that in this case you could use numbers such as 5, 55, 555, etc...

In other words, pretty much the basic stuff. No functions (floor, ceiling, rounding, trig functions, etc...). No increment or decrement (pre or post). I suppose square root would probably be allowed, but I'm guessing not other roots as that would call for an additional number. In any case the solution does not call for it. Nor does the solution call for raising anything to the 5th or 55th or 555th power (not sure if that is even acceptable in these types of problems though). As far as summations, I would think that you would need another number, right? The place I grabbed this from didn't go into much detail so all I can tell you is the symbols I have seen similar problems use (and of course I've seen the solution for this one.

[ July 20, 2003: Message edited by: Jason Menard ]

The solutions I have seen maybe (or maybe not) use the following math operators: (,),+,-,*,/,!. (<-- that's a period, not a decimal point) It is also acceptable to run numbers together, so that in this case you could use numbers such as 5, 55, 555, etc...

In other words, pretty much the basic stuff. No functions (floor, ceiling, rounding, trig functions, etc...). No increment or decrement (pre or post). I suppose square root would probably be allowed, but I'm guessing not other roots as that would call for an additional number. In any case the solution does not call for it. Nor does the solution call for raising anything to the 5th or 55th or 555th power (not sure if that is even acceptable in these types of problems though). As far as summations, I would think that you would need another number, right? The place I grabbed this from didn't go into much detail so all I can tell you is the symbols I have seen similar problems use (and of course I've seen the solution for this one.

[ July 20, 2003: Message edited by: Jason Menard ]

Jason Menard

Sheriff

Posts: 6450

Jim Yingst

Wanderer

Sheriff

Sheriff

Posts: 18671

Jason Menard

Sheriff

Posts: 6450

posted 13 years ago

I don't think that I said that exponentiation wasn't acceptable, merely that I didn't know. However since you all are making me put way more work into this then I had planned , further researching my sources indicates that exponentiation is indeed acceptable. I have seen it indicated as either

My appologies for the confusion. Sheesh... computer people.

[ July 20, 2003: Message edited by: Jason Menard ]

Originally posted by Jim Yingst:

A factorial is a "normal" operator but exponentiation is not? You've got some weird definitions here, Jason.

I don't think that I said that exponentiation wasn't acceptable, merely that I didn't know. However since you all are making me put way more work into this then I had planned , further researching my sources indicates that exponentiation is indeed acceptable. I have seen it indicated as either

******or

**^**. Square roots are also acceptable.

My appologies for the confusion. Sheesh... computer people.

[ July 20, 2003: Message edited by: Jason Menard ]

Michael Dunn

Ranch Hand

Posts: 4632

Jim Yingst

Wanderer

Sheriff

Sheriff

Posts: 18671

posted 13 years ago

True, but you tried to discourage it.

Of course ^ is just computer shorthand for the "real" (i.e. more common) mathematical notation, which would be to write the exponent as a superscript. Doesn't even require any extra symbols; it's purely positional. Just as valid as the "operator" that says two fives next to each other == fifty-five. Except we can't show it properly in this forum without the ^ symbol because HTML is off.

**I don't think that I said that exponentiation wasn't acceptable, merely that I didn't know.**

True, but you tried to discourage it.

**'^' is used in programming languages as an exponent operator, but isn't a real math operator**

Of course ^ is just computer shorthand for the "real" (i.e. more common) mathematical notation, which would be to write the exponent as a superscript. Doesn't even require any extra symbols; it's purely positional. Just as valid as the "operator" that says two fives next to each other == fifty-five. Except we can't show it properly in this forum without the ^ symbol because HTML is off.

"I'm not back." - Bill Harding, *Twister*

George Harris

Ranch Hand

Posts: 84

James Chegwidden

Author

Ranch Hand

Ranch Hand

Posts: 201