• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

The Four Fours Problem

 
Author
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is a problem that I found in a rec math book from the 1950's
This is an old problem consisting of expressing successive integers (to a limit) in appropriate mathematical form, using only 4 (four) fours (4's) in each expression together with any necessary signs.
Note: My math collegues had a field day with this problem.
Examples: 1 = 4/4 * 4/4
10 = (44 -4)/4
So for what are the first twenty numbers written in only 4 4's.
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1 ==44/44
2 ==(4*4)/(4+4)
3 ==(4+4+4)/4
4 ==4*(4^^(4-4))^^ is power
5 ==4+(4^^(4-4))^^ is power
6 ==4+((4+4)/4)
7 ==4+4-(4/4)
8 ==4+4+4-4
9 ==4+4+(4/4)
10 ==(44-4)/4
11 ==
12 ==
13 ==
14 ==
15 ==44/4 +4
16 ==4*4*4/4
17 ==
18 ==
19 ==
20 ==(4+(4/4))*4
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
12=(44+4)/4
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
11 == (4/.4) + (4/4)
 
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this is assuming i can use mod(x,y) and !
1 = (4/4)*(4/4)
2 = (4*4)/(4+4)
3 = ((4*4)-4)/4
4 = (4*(4-4))+4
5 = MOD((4/4),4)+4
6 = (SQRT(4))+(4-4)+4
7 = ((4+SQRT(4))+(4/4))
8 = ((4+4)*4)/4
9 = (4+4)+(4/4)
10 = (4!+SQRT(4)-4*4)
11 = (4!/SQRT(4))-(4/4)
12 = (4!+4-4*4)
13 = (4!/SQRT(4))+(4/4)
14 = (4*4)-(4/SQRT(4))
15 = (4*4)-(4/4)
16 = (4/4)*(4*4)
17 = (4*4)+(4/4)
18 = ((4*4)+4)-(SQRT(4))
19 = (4!-4-4/4)
20 = (4*(4/4+4))
 
Melvin Menezes
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
17 == (4*4)+(4/4)
Ah! Greg hit post button before i did!
Using a . was smart, David.
[ June 03, 2003: Message edited by: Melvin Menezes ]
 
Greg Harris
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry... i should have posted a link to my attempt, rather than the solutions.
i wish i had thought of 44 and 0.4... things would have been much easier!
(oops, i used html code)
[ June 03, 2003: Message edited by: Greg Harris ]
 
Author
Posts: 6055
8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did a variation of this in 6th grade. You can do all the numbers 0 to 100.
--Mark
 
Greg Harris
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
actually, after googling around, this guy says you can go from 0 to 40,000.
here is a short list that goes from 0 to 1,000.
not quite the same as what i came up with... and i did not think about using sin, cos, gamma, etc.
 
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
there is an old game: pick any 4 playing cards, use only "+", "-", "x", "/" to get 24.
the introduction of "mod", "sqrt", and so on makes it simpler. so why i can not use self defined functions?
[ June 04, 2003: Message edited by: Don Liu ]
 
Greg Harris
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> so why i can not use self defined functions?
well, if you provide a proof with your function, then you can use it!
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
let CVFD(4444) = 21,
so,
21 = CVFD(4444)
for any number X, i can define a function XXX(), let XXX(4444) = X
 
Greg Harris
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
nice
 
Your mind is under my control .... your will is now mine .... read this tiny ad
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic