## Pick a number… any number

Posted by Al Gelman on December 28, 2010 – 8:08 pm

Here is a puzzle to keep you busy on a cold winter’s night. Perhaps more than one!

The challenge is to express ANY positive integer using the number 2 precisely four times, and using only well-known mathematical symbols. (You can’t make up your own!)

Here are the first four.

1= (2+2) / (2+2)

2= (2+2) + (2+2)

3= (2 x 2) – (2/2)

4= 2 + 2 + 2 – 2

5= ?

.

.

97=?

Of course you’re not limited to the symbols I’ve used in the examples. I guarantee that every positive integer can be expressed this way.

December 29th, 2010 at 12:34 am

An old one but a good one! I won’t spoil it for others just yet.

No log fires needed to keep warm here in Oz!

December 29th, 2010 at 3:00 am

5= 2+2+2/2

97= ?

December 29th, 2010 at 3:33 am

97 = (2 x 2)! x (2 x 2) + 2/2

December 29th, 2010 at 4:30 am

6 = (2 + 2/2)!

December 29th, 2010 at 8:39 am

Has noone noticed that #2 above wrong?

December 29th, 2010 at 9:58 am

Post 2 looks ok

but…

post 3 has 6 “2″s

and

post 4 has only 3 “2″s

are powers allowed?

if so:

2 ^5 + 2 ^6 + 2/2 = 97

2 ^5 + 2 ^6 x 2/2 = 96

2 ^5 + 2 ^6 – 2/2 = 95

regards, Curtis

December 29th, 2010 at 11:46 am

Hi Curtis, if you can use numbers other than 2 in powers then why not in other expressions, e.g. 97 = 89+2+2+2+2.

So, I say use only 2’s.

Feeling the cold these winter nights? Put another log on the fire!

December 29th, 2010 at 12:54 pm

All, I totally misread the question/task. I will have to apologize for my errors.

5 = 2/2 + 2 + 2

6 = (2/2 + 2) x 2

7 = cos(2) + 2 + 2 + 2

8 = 2 + 2 + 2 + 2

9 = 22 / 2 – 2

10 = (2 * 2 * 2) + 2

Someone have set a lock on my brain. Challenging, put fun mind puzzle.

December 29th, 2010 at 1:07 pm

As there are mentioned to be only integers I may express 7 as

7 = sqrt(222) / 2

Square root of 222 is 14,899, but as an integer it is 14. 14 / 2 is 7.

December 29th, 2010 at 2:08 pm

Euclid’s Brother: That’s hilarious. For those who didn’t catch on, he’s referring to the question’s example of 2= (2+2) + (2+2). I’m sure he really meant 2= (2/2) + (2/2).

December 29th, 2010 at 3:26 pm

11 = ((2*2)!-2)/2

13 = ((2*2)!+2)/2

14 = (2+2)^2-2

16 = 2*2*2*2

18 = (2+2)^2+2

20 = (2*2)!-2-2

23 = (2*2)!-2/2

24 = (2*2)!+2-2

25 = (2*2)!+2/2

28 = (2*2)!+2+2

36 = (2+2+2)^2

46 = 2*(2*2)!-2

50 = 2*(2*2)+2

64 = (2*2*2)^2

December 29th, 2010 at 4:32 pm

I don’t know, if it’s ok with the rules, but here it is:

12 = sqr(2)+sqr(2)+sqr(2)

December 29th, 2010 at 4:33 pm

And #15:

15 = sqr(2)^2-2/2

December 29th, 2010 at 7:08 pm

Summing it all up, we have:

5 = 2+2+2/2 (Shelley)

6 = (2/2 + 2) x 2 (nordtop)

7 = cos(2) + 2 + 2 + 2 (nordtop)

8 = 2 + 2 + 2 + 2 (nordtop)

9 = 22 / 2 – 2 (nordtop)

10 = (2 * 2 * 2) + 2 (nordtop)

11 = ((2*2)!-2)/2 (Nathan)

12 = ?

13 = ((2*2)!+2)/2 (Nathan)

14 = (2+2)^2-2 (Nathan)

15 = ?

16 = 2*2*2*2 (Nathan)

17 = ?

18 = (2+2)^2+2 (Nathan)

19 = ?

20 = (2*2)!-2-2 (Nathan)

21 = ?

22 = ?

23 = (2*2)!-2/2 (Nathan)

24 = (2*2)!+2-2 (Nathan)

25 = (2*2)!+2/2 (Nathan)

26 = ?

27 = ?

28 = (2*2)!+2+2 (Nathan)

.

.

.

36 = (2+2+2)^2 (Nathan)

.

.

.

46 = 2*(2*2)!-2 (Nathan)

47 = ?

48 = ?

49 = ?

50 = 2*(2*2)+2 (Nathan)

.

.

.

64 = (2*2*2)^2 (Nathan)

Clearly Nathan is in the lead!

December 29th, 2010 at 9:41 pm

I’m sorry that I didn’t make myself quite clear. Only the number 2 may be used that means that numbers like 222 (used in response # 9 ) is not allowed, and powers, like 2^5 are not allowed, but powers like 2^2 are. Also, there must be exactly four 2’s in the solution and no other numbers. Post #2 is correct. Post #3 has too many 2’s. Post #6 has too few 2’s. Post # 6 is incorrect for the reasons given above. Post # 8 has some right, and some wrong. 22 is not allowed, and I believe that cos(2) is not an integer (cos(0) would work in your equation, but of course 0 is not allowed. )

Nathan has done a great job so far (but you forgot the factorial symbol in 50= …).

Some of the integers can be quite difficult (like 7), but solutions do exist. In fact there is a general solution that was discovered by the great English physicist, Paul Dirac, which the Wizard of Oz has alluded to. Thanks for not spoiling it, Wizard (or is it Mr. Oz?) The general solution is quite brilliant and not obvious at all. I will say that he uses a couple of math symbols that nobody has used yet.

December 29th, 2010 at 11:21 pm

Guys,

My knowledge in math stops about here. I think we may find 7 if we use deviation or the sum of the square of the values, but I don’t know how.

December 29th, 2010 at 11:49 pm

Al, is it allowed to use sqrt(sqrt(sqrt(sqrt(2)))), etc?

December 30th, 2010 at 12:34 am

I was just trying to figure out how to get the symbol for sqrt when nordtorp’s post 15 popped up.

Yes, sqrt’s should be definitely allowed in my book.

So log(2) base sqrt(2) = 2

log(2) base sqrt(sqrt(2)) = 4

log(2) base sqrt(sqrt(sqrt(2))) = 8

and so on. So, you can get any binary power with just two 2’s and a large enough pile of sqrt’s.

That should help with some of the gaps in post # 12.

December 30th, 2010 at 12:14 pm

use LOG(LOG(2,SQRT(SQRT(2*2))),2), where you add a square root to increase the result by 1

December 30th, 2010 at 12:33 pm

96=(2*(2*2)!)*2

Thought I’d just try and get at least one in there!!

December 30th, 2010 at 3:26 pm

Hi Nathan, I can’t interpret your Excel equation, but I’m sure you’ve got it.

Here’s my version:

sqrt(2) = 2^-1 = 2^-(2^0)

sqrt(sqrt(2)) = 2^-2 = 2^-(2^1)

sqrt(sqrt(sqrt(2))) = 2^-4 = 2^-(2^2) and so on.

sqrt(… n times . . . (sqrt(2)))…) = 2^-(2^n)

Taking logs to base 2:

log(2)[sqrt n times (sqrt(2)))...)] = -2^n

Taking logs again:

log(2){log(2)[sqrt n times (sqrt(2)))...)]} = -n

-log(2){log(2)[sqrt n times (sqrt(2)))...)]} = n

Need another 2 in there somewhere to make it up to the required four 2’s, so make the initial sqrt(2) into sqrt(2*2) as Nathan has done:

-log(2){log(2)[sqrt n+1 times (sqrt(2*2)))...)]} = n

So, any integer n can be arrived at with the appropriate number of sqrts in the above expression.

Martin Gardner, the American puzzlist, attributed this to a retired US colonel who submitted this many years ago to a US newspaper which had asked how many integers could be made up from four 2’s without knowing that there was a general solution. His answer ended the competition! So, he may have got it from Dirac, or vice versa. Who knows?

December 30th, 2010 at 9:37 pm

97=

[2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2](which is 100) minus [2+2](which equals up to 96) plus 2 (which equals up to 98) minus [2/2 or 1] which equals 97!

December 30th, 2010 at 9:44 pm

Yes Nordtorp, that is allowed.

Wizard of Oz, I agree that your final equation will result in a correct solution, however, I have some quibbles with it that I’ll get to in a bit. But first I’m afraid that your initial equations are incorrect. You wrote that

sqrt(2) = 2^-1. That is NOT correct because 2^-1 = ½ , and

sqrt(2) = 2^(1/2)

that means that all of your subsequent equations sqrt(sqrt( ) , etc. are also incorrect.

Also your equation

log(2)(sqrt n times (sqrt(2)))=-2^n is incorrect. The definition of log base 2 is : 2 raised to what power is equal to n. I’ll take the liberty of changing your notation for log base 2 to lg2(n). so the log base 2 of the square root of 2 could be written as 2^X = 2^1/2 and therefore X = lg2(sqrt(2)) = ½ .

Now if we take the log base 2 of ½ we get lg2(1/2) = -1. or written another way

2^X = ½ . X = lg2(1/2) = -1

Now if we put all that together, we get 1= -lg2(lg2(sqrt(2)))

Now here are my quibbles with your final equations. Your expression includes a number that is not a 2, namely, n+1. now I realize that you used n+1 to get around the requirement of having four 2’s in the expression however the use of n+1 ( or n for that matter) is not allowed by the rules. This is how Paul Dirac solved it. First of all you should realize that the symbol for square root that we all know and love – and unfortunately cannot depict on this website – is actually a contraction of the true symbol. Suppose you wanted to write the cube root of a number. You would use what has come to be called the square root sign, but written with a little 3 just above the check. Now strictly speaking the square root should also be written that way, only with a little 2 above the check. In common practice the 2 is omitted, and both symbols are now accepted to mean square root. So, because we can’t write symbols here, I propose the following :

2sqrt( ) . Then, the equation we derived above becomes

1 = -lg2(lg2(2sqrt(2))) which satisfies the rules. Here is what Dirac wrote.

2 = -lg2(lg2(2sqrt(sqrt(2))))

3 = -lg2(lg2(2sqrt(sqrt(sqrt(2)))))

.

.

.

N = -lg2(lg2{2sqrt( . . . sqrt(2) }

Of course he used the actual symbols.

December 31st, 2010 at 1:03 am

Hi Al,

I think we know each other well enough to dispense with formalities, so call me Wiz!

I certainly made a mess of the initial statements in post # 19. I’d originally worked it out correctly, then lost the piece of paper I’d had it written down on. I then wrote the post from memory, with the results that you saw. My memory’s not so good these days so I definitely need a sub-editor.

I should say, however, that the n+1 that you objected to was not a number, it was merely my way of saying that there are n+1 sqrts to be written here to arrive at the integer n. Also you place the extra 2 that we need (to make up the required four) in front of the first sqrt to indicate that this is a square root and not a cube or any other root. Maybe that’s what the first 2 in Nathan’s Excel expression in post # 17 means. Why do we not also place 2’s in front of all the succeeding sqrts?

But these are mere quibbles. This has been a very challenging exercise.

PS – Did anyone wonder what I was getting at with my earlier references to putting LOGS on the fire? Or did everyone think I was just being silly?

December 31st, 2010 at 4:10 am

ok even if that made SENSE i couldn’t solve it

December 31st, 2010 at 4:43 am

Wizard of Oz, I understood the hint about log, but I do not have the wisdom to calculate it.

January 1st, 2011 at 10:04 pm

How does 2=(2+2)+(2+2) ? (In reference to the original problem)

(2+2) + (2+2)

=4 + =4

8= (2+2)+ (2+2)

January 2nd, 2011 at 7:02 pm

That was a typo MARSHA, sorry about that. should be

2= (2/2) + (2/2)

April 10th, 2012 at 2:18 pm

Dear Al — are the following solutions permissible?:

7 (2+2+2) + log

_{2}(2)9 2(2+2) – log

_{2}(2)15 (2+2)^2 – log

_{2}(2)17 (2+2)^2 + log

_{2}(2)**Sorry, I couldn’t follow the Dirac-based algorithm.

April 11th, 2012 at 6:17 am

Hi Jym. Your solutions are good.

Dirac actually did it with three 2’s. Al probably decided to disguise the original problem to make it harder to find the solution by Googling.

The square root sign is written √. When you first learn it you may be shown ²√ and the cube root sign is ³√.

So in order to force the extra 2 in, Al used both ²√ and √. I’ll continue with the original three 2’s problem.

√√…√√2, where there are N √ signs = 2^2

^{-N}.e.g. √√√2 = 2^(1/8) = 2^(1/2³) = 2^(2

^{-3})Now take logs base 2 => log

_{2}(2^2^{-N}) = 2^{-N}Take logs base 2 once more => log

_{2}2^{-N}= -NSo N = – log

_{2}log_{2}(√√…√√2 ) with N √ signs.May 22nd, 2014 at 2:57 pm

I’m doing a project for school and i’m have trouble with 76, 79, 81, 84, and 136. Any help given will be greatly appreciated.

May 27th, 2014 at 4:18 am

Zoe Price – http://joyofmathshirali.blogspot.co.uk/2010/03/problem-of-four-2s.html

November 20th, 2015 at 8:38 pm

I need answer 9 by using four 2’s through using thessymbolsls ()*-+/^ don’t combine two 2’s together to find answer…