SERVING THE QUANTITATIVE FINANCE COMMUNITY

• 1
• 2

Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

### Creating a 21

This may be too easy, but:Using ONLY the numbers 1, 5, 6 and 7 (and using each one ONLY ONCE), make a formula that equals 21.You can do any operation you like, but only use those numbers. You CAN NOT stick the numbers together, e.g. sticking 1 and 5 together to get 15 is NOT allowed.

Ri
Posts: 92
Joined: November 7th, 2003, 10:37 am

### Creating a 21

Is allowed?

Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

### Creating a 21

Not the answer I was looking for, but it works!There is another solution.

nsande
Posts: 323
Joined: January 9th, 2002, 11:00 am

### Creating a 21

QuoteOriginally posted by: ArrowayThis may be too easy, but:Using ONLY the numbers 1, 5, 6 and 7 (and using each one ONLY ONCE), make a formula that equals 21.You can do any operation you like, but only use those numbers. You CAN NOT stick the numbers together, e.g. sticking 1 and 5 together to get 15 is NOT allowed.You said any operation so here is one suggestion21=6*7/(Int(ln(5))+1)Int is the integer part and ln is the natural logarithm.Regards,Niclas

Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

### Creating a 21

I don't know if "Int" is an operation, but I'm lenient, so sure that counts. There is still another way...

NE1
Posts: 88
Joined: August 5th, 2002, 11:36 pm

### Creating a 21

QuoteOriginally posted by: ArrowayI don't know if "Int" is an operation, but I'm lenient, so sure that counts. There is still another way...If one can use the Int operation and therefore relaxing the rules by a whole lotthen one can also do ceiling(6/5) = ceiling(1.2) = 2so ( ceiling(6/5)+1 )*7 = 21 too. Here ceiling is an operator that rounds a decimal number upward.

Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

### Creating a 21

Sure you get credit too!But there is a MUCH cleaner (and more exact) way...
Last edited by Arroway on March 17th, 2004, 11:00 pm, edited 1 time in total.

quantie
Posts: 907
Joined: October 18th, 2001, 8:47 am

### Creating a 21

QuoteOriginally posted by: ArrowaySure you get credit too!But there is a MUCH cleaner (and more exact) way...Okay what operators are there in your answer? Surely they are not restricted to { +,-, * , / , ^}

Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

### Creating a 21

Yup, you can do it with the set of operators that includes add, subtract, multiply and divide.

QwertyYuiop
Posts: 36
Joined: October 10th, 2003, 7:39 pm

### Creating a 21

5+6+7-1 == 21 in octal...

ob
Posts: 5
Joined: June 8th, 2003, 9:56 pm

### Creating a 21

Arroway,I got the "clean" solution using only four basic arithmetic operations:6 / (1 - 5/7) = 21

Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

### Creating a 21

ob is the winner!!!

marajesh
Posts: 15
Joined: July 14th, 2002, 3:00 am

### Creating a 21

can U do 7 *6/+(sqrt(5-1))

Arroway
Topic Author
Posts: 580
Joined: January 19th, 2003, 10:06 pm

### Creating a 21

While I am lenient, I don't know if that one qualifies. The reason is that square root is equivalent to raising to the one half power. Obviously you need a one and a two to do that. Maybe squares and square roots are operators in and of themselves, as opposed to "just" being powers, but that's something we can all vote on...

quantie
Posts: 907
Joined: October 18th, 2001, 8:47 am

### Creating a 21

QuoteOriginally posted by: ArrowayWhile I am lenient, I don't know if that one qualifies. The reason is that square root is equivalent to raising to the one half power. Obviously you need a one and a two to do that. Maybe squares and square roots are operators in and of themselves, as opposed to "just" being powers, but that's something we can all vote on...okay lets change the problem to 22 I've got three answers here!

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...

 JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...

GZIP: On