## The four fours problem

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

mattmacf
Posts: 90
Joined: Sat Sep 02, 2006 11:19 pm UTC
Contact:

### The four fours problem

A fun problem a former history professor gave to me an a friend to keep us occupied during class

Using only four 4's in whatever combination, using as many operators as you desire, create a representation for each of the first 100 whole numbers. A couple examples to get you started:

0: 4 + 4 - 4 - 4 OR 44 - 44
1: 44/44 OR 4/4 + 4 - 4

The rules are only as strict or as lax as you make them. There are plenty of websites on the problem if you're so inclined to chea^H^H^H^Hresearch the problem, although it's a lot more fulfilling if you do it yourself. Things start to get very hairy around 31 or 73.

Enjoy!

EDIT:Some clarification of the rules as I understand them:
• You must use exactly four 4's
• You cannot use numbers other than 4. This means
• The multiplicitative inverse is no good (unless there's a way you can do it without 4^-1 or 1/4 that I'm not aware of)
• Sqr(4) is ambiguous. 4^2 is obviously no good, so I'm hesitant to say that Sqr(4) is an acceptable workaround. Any answer that can be done without it (i.e. pretty much all of them I think) would be preferable
• Sqrt(4) is ok. In ordinary mathematical notation, the root operator defaults to 2 the same way log(x) implies log_10(x). No need to get terribly pedantic here
• Constants are no good, as they are neither a function nor a four. This is also to avoid simply adding euler's identity an arbitrary number of times
Last edited by mattmacf on Wed May 02, 2007 2:08 am UTC, edited 2 times in total.

cmacis
Posts: 754
Joined: Wed Dec 13, 2006 5:22 pm UTC
Contact:
2: 4/4+4/4
li te'o te'a vei pai pi'i ka'o ve'o su'i pa du li no
Mathematician is a function mapping tea onto theorems. Sadly this function is irreversible.
QED is Latin for small empty box.
Ceci nâ€™est pas une [s]pipe[/s] signature.

The LuigiManiac
Posts: 695
Joined: Sun Apr 29, 2007 4:09 am UTC
Location: Trapped in a hypothetical situation somewhere in Ontario...help?
3: 4/4 + sqrt4
Spoiler:
THE CAKE IS A 3.141592653589...!

Token
Posts: 1481
Joined: Fri Dec 01, 2006 5:07 pm UTC
Location: London
3: phi(4^sqrt(4) + sqrt(4)) / phi(phi(phi(4!))

EDIT: too late - I'll do 4 instead

4: ((4! / 4) - 4) x sqrt(4)
Last edited by Token on Wed May 02, 2007 12:46 am UTC, edited 1 time in total.

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
3: 4 - ((4^(1/4))^4

(The ^1/4 is really the 4th root of 4; I'm not cheating)

EDIT: Crap I'm slow

4: 4 * ((4^(1/4))^4)

(Got to reuse my solution almost though )
Last edited by EvanED on Wed May 02, 2007 12:47 am UTC, edited 1 time in total.

The LuigiManiac
Posts: 695
Joined: Sun Apr 29, 2007 4:09 am UTC
Location: Trapped in a hypothetical situation somewhere in Ontario...help?
Token wrote:3: phi(4^sqrt(4) + sqrt(4)) / phi(phi(phi(4!))

You win.

4: 4 + 4 - 4

(EDIT: Didn't notice the four fours part, I was beaten out anyway in them)
Last edited by The LuigiManiac on Wed May 02, 2007 12:53 am UTC, edited 1 time in total.
Spoiler:
THE CAKE IS A 3.141592653589...!

cmacis
Posts: 754
Joined: Wed Dec 13, 2006 5:22 pm UTC
Contact:
4: 4+[4^-1]+[4^-1]+[4^-1]

Where [] is take integer part. And ^-1 means taking multiplicative inverse.
li te'o te'a vei pai pi'i ka'o ve'o su'i pa du li no

Mathematician is a function mapping tea onto theorems. Sadly this function is irreversible.

QED is Latin for small empty box.

Ceci nâ€™est pas une [s]pipe[/s] signature.

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
Wait, do we have to use exactly four 4s, or just up to four 4s?

I interpreted as the former, because that makes it more interesting, but then none of LuigiManiac's solutions work.

Token
Posts: 1481
Joined: Fri Dec 01, 2006 5:07 pm UTC
Location: London
Who says you are allowed 1s?

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
And

5: 4 + ((4^(1/4))^4)

cmacis
Posts: 754
Joined: Wed Dec 13, 2006 5:22 pm UTC
Contact:
I didn't use a 1, it was part of the notation for the operator "taking multiplicative inverse".
li te'o te'a vei pai pi'i ka'o ve'o su'i pa du li no

Mathematician is a function mapping tea onto theorems. Sadly this function is irreversible.

QED is Latin for small empty box.

Ceci nâ€™est pas une [s]pipe[/s] signature.

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
Token wrote:Who says you are allowed 1s?

Read my post; that's the 4th root of 4. I just can't actually write that except by some ambiguous function call like root(4, 4) or in words, so I expressed it as ^1/4.

gmalivuk
GNU Terry Pratchett
Posts: 26676
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:
6 = (4+sqrt(4)) * (4/4)

Also, what part of four fours do people not understand?
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)

Xial
Posts: 185
Joined: Thu Mar 29, 2007 2:01 am UTC
Location: California
6: 4+Sqrt(4)+4-4

since gmalivuk beat me to it ill do 7 too

7: 4+sqrt(4)+4/4
Last edited by Xial on Wed May 02, 2007 12:56 am UTC, edited 1 time in total.

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
Might as well take care of the next three:

7: 4 + 4 - 4/4
8: 4 + 4 * 4/4
9: 4 + 4 + 4/4

cmacis
Posts: 754
Joined: Wed Dec 13, 2006 5:22 pm UTC
Contact:
Using only four 4's

Looks like "Use no more than 4" rather than "use exactly 4". Though it's clear from the title and to keep the puzzle interesting that it's the latter.
li te'o te'a vei pai pi'i ka'o ve'o su'i pa du li no

Mathematician is a function mapping tea onto theorems. Sadly this function is irreversible.

QED is Latin for small empty box.

Ceci nâ€™est pas une [s]pipe[/s] signature.

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
And because I like my solution (I'll stop after this one for a while...)

10: 4*4 - 4!/4

Token
Posts: 1481
Joined: Fri Dec 01, 2006 5:07 pm UTC
Location: London
Well, unless you require that you have to have an actual, well-known symbol for an operation that doesn't involve a non-permitted number, then the whole game becomes rather pointless. I may be being dense here, but I can't think of a way of writing the multiplicative inverse of a number without using a 1.

11: (4! - sqrt(sqrt(4*4)))/sqrt(4)
Last edited by Token on Wed May 02, 2007 1:00 am UTC, edited 1 time in total.

Pathway
Leon Sumbitches...?
Posts: 647
Joined: Sun Oct 15, 2006 5:59 pm UTC
6 = 4 + 4 - 4 + sqrt(4)

7 = 4 + 4 - (4/4)

8 = (4/4)*(4+4)

9 = 4/4 + 4 + 4

10 = 4*sqrt(4) + 4/sqrt(4)
er, do we get bonus points if our answers have nice symmetries?

10 = cuberoot(4+4) + 4 + 4

11 = AAGH MISTAKE

12 = 4*4 - sqrt(4) - sqrt(4)
SargeZT wrote:Oh dear no, I love penguins. They're my favorite animal ever besides cows.

The reason I would kill penguins would be, no one ever, ever fucking kills penguins.

Xial
Posts: 185
Joined: Thu Mar 29, 2007 2:01 am UTC
Location: California
Pathway wrote:6 = 4 + 4 - 4 + sqrt(4)

7 = 4 + 4 - (4/4)

8 = (4/4)*(4+4)

9 = 4/4 + 4 + 4

10 = 4*sqrt(4) + 4/sqrt(4)
er, do we get bonus points if our answers have nice symmetries?

10 = cuberoot(4+4) + 4 + 4

11 = 4 + 4 + 4 - sqrt(4)

12 = 4*4 - sqrt(4) - sqrt(4)

11 is flawed. 4+4+4-sqrt(4) is 10

if the use of "squared" is allowed than

11:squared(4) -4 -4/4
Last edited by Xial on Wed May 02, 2007 1:06 am UTC, edited 1 time in total.

The LuigiManiac
Posts: 695
Joined: Sun Apr 29, 2007 4:09 am UTC
Location: Trapped in a hypothetical situation somewhere in Ontario...help?
13: 4squared - sqrt4 - 4/4
Spoiler:
THE CAKE IS A 3.141592653589...!

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
Not a fan of "squared"; the only notation I know for it uses a 2. Similarly not a fan of the ^-1 to do 1/x.

But I can't come up with anything better for 13, so:

14 = 4 + 4 + 4 + sqrt(4)

Xial
Posts: 185
Joined: Thu Mar 29, 2007 2:01 am UTC
Location: California
15= 4*4-4/4
16=4*4*4/4
17=4*4+4/4
18=4*4+4-sqrt(4)

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
19 = 4! - 4 - 4/4
20 = (4! - 4) * 4/4
21 = 4! - 4 + 4/4

Xial
Posts: 185
Joined: Thu Mar 29, 2007 2:01 am UTC
Location: California
22 = 4! - sqrt(4) * 4 / 4
23 = 4! - sqrt(4) * sqrt(4) / 4
24 = 4! * (sqrt(4) * sqrt(4) / 4)
25 = 4! + (sqrt(4) * sqrt(4) / 4)

Edited for proper use of spacing and parenthesis

AndreGiant
Posts: 10
Joined: Mon Apr 30, 2007 1:02 am UTC
Location: A Pale Blue Dot
Contact:
26 = 4! + (4+4)/4

Woot.
That, in precise historical terms, sucks. - Bill Sutton

mattmacf
Posts: 90
Joined: Sat Sep 02, 2006 11:19 pm UTC
Contact:
Because I really don't like the way 11 and 13 were done with the 4^2 thing (and because I'm OCD like that), I submit

11: gamma(4)*sqrt(4)-4/4
13: gamma(4)*sqrt(4)+4/4

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
mattmacf wrote:Because I really don't like the way 11 and 13 were done with the 4^2 thing (and because I'm OCD like that), I submit

11: gamma(4)*sqrt(4)-4/4
13: gamma(4)*sqrt(4)+4/4

Heh, nice. I forgot gamma(n) = (n-1)! instead of n!. (Though 11 had a "legitimate" solution from Token.)

27 = 4! + 4 - 4/4
28 = (4+4)*4 -4
29 = 4! + 4 + 4/4
30 = (4+4)*4 - sqrt(4)

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:

### Re: The four fours problem

mattmacf wrote:EDIT:Some clarification of the rules as I understand them:
[list][*]Sqr(4) is ambiguous. 4^2 is obviously no good, so I'm hesitant to say that Sqr(4) is an acceptable workaround. Any answer that can be done without it (i.e. pretty much all of them I think) would be preferable

I'm not sure here. It depends upon how you interpret something like f^-1(x). It's not 1/f(x) or anything like that; it's just a notation for inverses. f^-2(x) doesn't make sense for instance, so that would argue in favor of this view.

In that sense, sqr = sqrt^-1.

I don't like it, but I do think that it's better not using it.

For instance, there's nothing in the above rules that would outlaw the following for 31:
31 = (4+4) * 4 - floor(sqrt(sqrt(4)))
but there's probably a better way to do it.

skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco
32=4*4+4*4
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

mattmacf
Posts: 90
Joined: Sat Sep 02, 2006 11:19 pm UTC
Contact:

### Re: The four fours problem

EvanED wrote:For instance, there's nothing in the above rules that would outlaw the following for 31:
31 = (4+4) * 4 - floor(sqrt(sqrt(4)))
but there's probably a better way to do it.

Haha very creative! I like it. Personally I was thinking something along the lines of

31 = 4^5/2 - 4/4

Where 4^5/2 really equals the .4'th root of 4

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:

### Re: The four fours problem

mattmacf wrote:
EvanED wrote:For instance, there's nothing in the above rules that would outlaw the following for 31:
31 = (4+4) * 4 - floor(sqrt(sqrt(4)))
but there's probably a better way to do it.

Haha very creative! I like it. Personally I was thinking something along the lines of

31 = 4^5/2 - 4/4

Where 4^5/2 really equals the .4'th root of 4

Then we also have
33 = 4^5/2 + 4/4
34 = (4+4)*4 + sqrt(4)

mattmacf
Posts: 90
Joined: Sat Sep 02, 2006 11:19 pm UTC
Contact:
35 = gamma(4)*gamma(4) - 4/4
36 = gamma(4)*gamma(4) + 4 - 4
37 = gamma(4)*gamma(4) + 4/4

skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco
Very nice Matt!
38=4^1/.4+4+sqrt(4)
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
39 = .4/4 - 4/4
40 = .4/4 * 4/4
41 = .4/4 + 4/4

And since I'm on a roll and so I can do 42

42 = 44 - 4 + sqrt(4)

43 = 44 - 4/4
44 = 44 * 4/4
45 = 44 + 4/4
46 = 44 + 4 - sqrt(4)

(Mmmm, patterns...)

Solt
Posts: 1912
Joined: Tue Mar 27, 2007 5:08 am UTC
Location: California
EvanED wrote:3: 4 - ((4^(1/4))^4

4: 4 * ((4^(1/4))^4)

EvanED wrote:5: 4 + ((4^(1/4))^4)

Ok Please explain how the fourth root of a number x raised to the fourth power equals 1, not x.

By my calculations, your solution for 3 = 0, 4 = 16, and 5 = 8.

???

I think you are getting ^ confused with *, because the latter (4*(1/4))^4) would give you 1, but is inconsistent with the rules. What you should be using is 4^(4-4) = 1.

Why did no one else catch this? Am I wrong?
"Welding was faster, cheaper and, in theory,
produced a more reliable product. But sailors do
not float on theory, and the welded tankers had a
most annoying habit of splitting in two."
-J.W. Morris

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
Solt wrote:
EvanED wrote:3: 4 - ((4^(1/4))^4

4: 4 * ((4^(1/4))^4)

EvanED wrote:5: 4 + ((4^(1/4))^4)

Ok Please explain how the fourth root of a number x raised to the fourth power equals 1, not x.

Um... because I'm an idiot apparently.

Not sure what I was thinking. I think it's purely a coincidence that if you replace ^ with * the equality holds.

umbrae
Posts: 336
Joined: Sat Sep 09, 2006 2:44 pm UTC
Contact:
47: 4!+4!-(4/4)
48: 44+4%(4!) is modulo allowed? Especially where it's completely a copout like right here?
49: 4!+4!+(4/4)

Edit: a better 48 just in case: 44 + (4! / gamma(4))

skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco
48=44+sqrt(4)+sqrt(4)
50=44+sqrt(4)+4

And how is .4/4=40?

39=<4,4>-4/4
40=4^(1/.4)+4+4
41=<4,4>+4/4

Here <x,y> is Cantor's pairing function <x,y>=1/2(x+y)(x+y+1)+y, which gives a bijection from the set of pairs of natural numbers to the natural numbers.
Last edited by skeptical scientist on Wed May 02, 2007 7:16 am UTC, edited 2 times in total.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

EvanED
Posts: 4331
Joined: Mon Aug 07, 2006 6:28 am UTC
Contact:
skeptical scientist wrote:48=44+sqrt(4)+sqrt(4)
50=44+sqrt(4)+4

And how is .4/4=40?

You know, maybe I should just resign from doing math. :-p