Ed Pegg Jr., March 1, 2004
In 1892, W W Rouse Ball published the four 4's problem in his classic "Mathematical Recreations and Essays". I see many odd variations of the problem, usually sent to me by desperate students. The answers usually aren't given in the rec.puzzles FAQ.The most difficult problems of this type I see involve using all of
the digits, along with some arrangement of blanks. For example,
substitute the digits 1 to
9 for the letters a to i in a/bc + c/de + f/gh = 1 to make a true statement. (Answer). I saw a more difficult version of this problem given to fourth graders. Solve (a × bc + d/e)/(fg + h/i) = 50, with digits 1 to
9 for the letters a to i. (Answer.)
I used a brute force method. I asked the teacher to solve (a
× bc + d/e)/(fg + h/i) = 40 under the same criteria, but never
heard back.
The operators can be constrained. The complexity of n is sometimes defined as the number of 1's required to build n using + and ×. This is sequence A005445 in OEIS. Twelve can be represented as (1+1+1+1)×(1+1+1), so the complexity of 12 is 7. Finding the complexity of 2004 is quite tricky.
Sometimes, the numbers and symbols are given. Last year, Yoshio Mimura offered this: 1 2 3 4 5 6 7 8 = 2003. Add each of +, −, ×, ÷ exactly once to make the equation true. Answer. There are many puzzles of this type.
For this year, Erich Friedman suggested representing 2004 with a minimal number of some digit. I received many answers.
(0!+0!)*(0!+0!+(0!+(0!+0!+0!)^(0!+0!))^(0!+0!+0!)) = 2004 Boris Alexeev
(0!+0!+0!+0!)*(0!+(0!+0!+0!+0!)*(0!+0!+0!+0!+0!)^(0!+0!+0!)) = 2004 Juha Saukkola
(1111-111+1+1)*(1+1) == 2004; Matt Jones, Juha Saukkola
(1+1)^11-11*(1+1)^(1+1) == 2004; Philippe Fondanaiche
(1+1)*(1+1+(11-1)^(1+1+1)) == 2004; Boris Alexee
sqrt(2^22)-2*22 == 2004; Boris Alexeev, Aad van de Wetering
ceil(((2*2)!^sqrt(2)/2)^2) == 2004; Boris Alexeev
2^(22/2)-2*22 == 2004; Erich Friedman
333*3!+3!
== 2004; Boris Alexeev
3+floor(3!^sqrt(3* 3!)) == 2004; Boris Alexeev
(333+3/3)*(3+3) == 2004; Erich Friedman
(3!^3-3)*3!+3!!+3! == 2004; Aad van de Wetering
sqrt(sqrt(4^4!))/sqrt4-44 == 2004; Boris Alexeev
ceil(4!^sqrt(4+4)/4) == 2004; Boris Alexeev
(4+4)*4^4-44
== 2004; Philippe Fondanaiche, Gaurav Singhal
((4^4)*4-4!+sqrt4)*sqrt4 == 2004; Aad van de Wetering
5+5!/5+5*(5*55+5!) == 2004; Boris Alexeev
ceil(sqrt(sqrt5^5)*floor(5!*sqrt5)) == 2004; Boris Alexeev
5*5*5*(5+5+5+(5/5))+5-(5/5)== 2004; Matt Jones
6*6*6*6+6!-6-6 == 2004; Boris Alexeev
ceil((6-sqrt6)^6) == 2004; Boris Alexeev
((6+6+6)/6)*666+6 == 2004; Erich Friedman
6!+(sqrt(6^6))*6-6-6 == 2004; Aad van de Wetering
7+77+(7!+7!*7)/(7+7+7) == 2004; Boris Alexeev
floor(sqrt7+sqrt(sqrt77^7)) == 2004; Boris Alexeev
((7*7-7)*7-7)*7-7+(7+7)/7 == 2004; Philippe Fondanaiche
7*7*7*7-7*7*7-7*7-7+(7+7)/7 == 2004; Juha Saukkola
(8!-8*8)/(8+8)-8*8*8 == 2004; Boris Alexeev
sqrt(8+8)*(sqrt(8^8)-88)/8 == 2004; Boris Alexeev
(8*8*8*8-88)*8/(8+8) == 2004; Philippe Fondanaiche
(sqrt(8^8)-88)/(sqrtsqrt(8+8)) == 2004; Aad van de Wetering
(999+(9+9+9)/9)*(9+9)/9 == 2004; Philippe Fondanaiche
9!/(9*9+99)-sqrt9-9 == 2004; Boris Alexeev
ceil(9^sqrt(9+sqrt9))-9-9 == 2004; Boris Alexeev
(99*(9+9))+((999/9)*((99/9)-9)) == 2004; Matt Jones
999+999+9-(9+9+9)/9 == 2004; Juha Saukkola
999+999+9-sqrt9 == 2004; Juha Saukkola
999*((9+9)/9)+((9+9)*9/(9+9+9)) == 2004; Sudeepth Jeevan
(((sqrt9)!^sqrt9)+(sqrt9)!)*9)+(sqrt9)! == 2004; Aad van de Wetering
The ultimate minimization of digits was done by Roger Phillips. He was able to represent 2004 with a single 5, via
120 = fac(5)
36 = ceil(sqr(sqr(sqr(sqr(sqr(sqr(sqr(fac(120)))))))))
397 = ceil(sqr(sqr(sqr(sqr(fac(36))))))
2308 = floor(sqr(sqr(sqr(sqr(sqr(sqr(sqr(sqr(fac(397))))))))))
2004 = ceil(sqr(sqr(sqr(sqr(sqr(sqr(sqr(sqr(sqr(sqr(sqr(fac(2308)))))))))))))
My favorite 2004 answer is , by Boris Alexeev.
By Steven Wilson's exquisiteness criteria, the fact that it uses a
rounding function are the worst thing you can use. I like them,
though. For arithmetic I need to do in my head, I'd rather deal
with a rounding function.
References:
Paul Bourke, Four Four Problems, http://astronomy.swin.edu.au/~pbourke/fun/4444/.
Zhe Hu, Combinatorial Card Games: Point 24 and Krypto, http://library.wolfram.com/infocenter/MathSource/5131/.
Yoshio Mimura, Math Is Fun, http://www.kobepharma-u.ac.jp/%7Emath/index.html.
Ed Pegg Jr, 2004 Solutions, http://www.mathpuzzle.com/2004.txt.
David Wheeler, The Definitive Four Fours Answer Key, http://www.dwheeler.com/fourfours/.
Steven J. Wilson, IntegerMania, http://staff.jccc.net/swilson/integermania/exquisiteness.htm.
Stephen Wolfram, Operator representations, NKS|Online, http://www.wolframscience.com/nksonline/page-916.
Mathematica Code for the (a × bc + d/e)/(fg + h/i) = 50 problem:
jj = Permutations[Range[9]];
integersols = Table[If[IntegerQ[prob[jj[[kk]]]],prob[jj[[kk]]],{}],{kk,1, Length[jj]}];
Position[integersols, 50]
jj[[240866]]
Comments are welcome. Please send comments to Ed Pegg Jr. at ed@mathpuzzle.com.
Ed Pegg Jr. is the webmaster for mathpuzzle.com. He works at Wolfram Research, Inc. as the administrator of the Mathematica Information Center.