The Museum of HP Calculators

HP Forum Archive 16

[ Return to Index | Top of Index ]

New four-fours problem: pi!
Message #1 Posted by Gerson W. Barbosa on 22 Oct 2006, 8:15 p.m.

As you know, the four-fours classical problem consists in expressing the first integer numbers using algebraic expressions involving only four fours, either alone or concatenated. Operators '+', '-', '*', '/', '^' and functions 'sqrt(x)' and 'x!' (on HP calculators) are allowed. Thus,

0 = 44 - 44
1 = 44/44
2 = 4/4 + 4/4
3 = (4 + 4 + 4)/4  or  sqrt(4 * 4) - 4/4
4 = 4 + (4 - 4)/4  or  4! -(4 * 4) - 4
5 = (4 * 4 + 4)/4  or  sqrt(4 * 4) + 4/4

and so on.

The four-fours problem originally applies only to integers. What about expanding it to include an exact representation of pi, while sticking to the rules above?

      
Re: New four-fours problem: pi!
Message #2 Posted by Paul Dale on 22 Oct 2006, 8:32 p.m.,
in response to message #1 by Gerson W. Barbosa

Got it :-) Well kind of.

Relying on this little equality:

    gamma(0.5) = sqrt(pi) = (-0.5) !

we get:

    (-4 / (4 + 4)) ! ^ sqrt(4)

Unary minus wasn't explictly allowed. You might be able to avoid that by using this equality instead:

    gamma(1.5) = sqrt(pi) / 2 = 0.5 !

Can it be done relying on ! as factorial not gamma?

- Pauli

            
Re: New four-fours problem: pi!
Message #3 Posted by Gerson W. Barbosa on 22 Oct 2006, 8:49 p.m.,
in response to message #2 by Paul Dale

Quote:
Unary minus wasn't explictly allowed.

I think that's ok as algebraics allow it. Of course, gamma(x) was also allowed because I said "x! on HP calculators" (on those, factorial is simply n!, as on the 12C)

You really got it! Congratulations! I could simply have shown the expressions but I thought you'd like to find them by yourself:

sqrt((gamma(4/(4+4))^4)  (On the HP-50G)

sqrt(((-4/(4+4)!)^4) (On other scientific calculators)

Regards,

Gerson.

Edited: 22 Oct 2006, 8:57 p.m.

            
Re: New four-fours problem: pi!
Message #4 Posted by Gerson W. Barbosa on 22 Oct 2006, 9:45 p.m.,
in response to message #2 by Paul Dale

Quote:
Can it be done relying on ! as factorial not gamma?


Only in approximate expressions, like this very rough one:-)

4/4*(sqrt(sqrt(4*4!))

If other functions were allowed, other constants might be possible:

44 ENTER 44 / ex

Gerson.

            
Re: New four-fours problem: pi!
Message #5 Posted by Arnaud Amiel on 23 Oct 2006, 3:23 p.m.,
in response to message #2 by Paul Dale

It does not work on the 6s (but is it an hp?) :-( and surely many others

Arnaud

                  
Re: New four-fours problem: pi!
Message #6 Posted by Gerson W. Barbosa on 23 Oct 2006, 4:17 p.m.,
in response to message #5 by Arnaud Amiel

This will not work on the 6S because it does not have the gamma function (x!)*, only the factorial function (n!). Same on the 12C and other HP financial calcs.

Regards,

Gerson.

--------

Actually, here x! means gamma(x+1) for non-integers and factorial(x) for positive integers.

Edited: 23 Oct 2006, 4:44 p.m.

                        
Re: New four-fours problem: pi!
Message #7 Posted by Paul Dale on 23 Oct 2006, 7:23 p.m.,
in response to message #6 by Gerson W. Barbosa

Likewise on the 42s (n! vs x!), but it has a real gamma function as well.

- Pauli

            
Re: New four-fours problem: pi!
Message #8 Posted by Gerson W. Barbosa on 23 Oct 2006, 10:31 p.m.,
in response to message #2 by Paul Dale

Quote:
Unary minus wasn't explictly allowed. You might be able to avoid that by using this equality instead:

    gamma(1.5) = sqrt(pi) / 2 = 0.5 !

Thanks for the suggestion. Did you have in mind something like this?

'4*sqrt((sqrt(4)/4)!^4)'

It appears the original rules allowed only four fours and the four arithmetic operators. This book, which I read in the original Portuguese while in middle school, presents solutions to zero through 10 using only these simplified rules. Later the rules were loosened to allow for larger integers... and now we are loosening them even more by making x! = gamma(x+1) :-)

Edited: 23 Oct 2006, 10:39 p.m.

                  
Re: New four-fours problem: pi!
Message #9 Posted by Paul Dale on 23 Oct 2006, 11:10 p.m.,
in response to message #8 by Gerson W. Barbosa

Quote:
'4*sqrt((sqrt(4)/4)!^4)'

I hadn't actually sat down and tried to do it using that formula but this works great :-)

There are plenty of refernces on the web to this puzzle with lots of solutions. For example this site goes to 40000 with varying degrees of purity.

- Pauli


[ Return to Index | Top of Index ]

Go back to the main exhibit hall