## Four Fours

One famous puzzle is to make a certain positive integer out of four fours (in base 10, with standard mathematical operations, but with no other numbers besides the four fours). For example, you can make 1 with 44/44. The rules seem to vary. Some say that you can also use three or fewer fours; others say that you can use ".4~" for a repeated "0.44444..." Some say you can use sines, logs, gamma function, etc. Let's say that you must use four fours, not fewer. It turns out that you can make any number from 1 to 100 (and others) out of four fours and these operations

• subtraction
• multiplication (*)
• division
• square root (sqrt())
• fourth powers (^4)
• factorial (!)
• .4~ for a repeated 0.44444...

We won't allow logarithms (or percent or int()). You might want to work on that. A few are very difficult. It is preferable to use the fewest number of operators possible. Try it yourself, as it is fun.

Here are my solutions for the first few numbers. Some of these are not optimal (fewest operators):

1. 44/44
2. 4/4+4/4
3. (4+4+4)/4
4. 4*(4-4)+4
5. 4!/4-4/4 (not optimal)
6. (4+4)/4+4
7. 44/4-4
8. 4+4+4-4
9. 4+4+4/4
10. 4+4+4-sqrt(4) (not optimal)
11. 4!/sqrt(4)-4/4 (not optimal)
12. 4!-4-4-4 (not optimal)
13. 4!/sqrt(4)+4/4 (not optimal)
14. 4+4+4+sqrt(4)
15. 4*4-4/4 (not optimal)
16. 4+4+4+4
17. 4*4+4/4
18. 4*4+4/sqrt(4) (better than the solution at Math Forum - Four 4's Puzzle)
19. 4!-4-4/4
20. 4!+4-4-4

Here are some pages by other people. The rules vary:

And there are contests out there. Most of the answers can be found at these three sites, so the contests are old news by now.

Surprisingly, if logarithms are allowed, it turns out that any positive integer can be expressed with three fours:

n=-ln[ln[sqrt(sqrt(sqrt...(sqr(4))...))]/ln(4)]/ln(4)

where the number of square roots is twice n. I haven't checked this out to see if it is true.