Subscribe via feed.

## 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.

Tags:
This post is under “Tom” and has 33 respond so far.

### 33 Responds so far- Add one»

1. 1. Wizard of Oz Said：

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!

2. 2. Shelley Said：

5= 2+2+2/2
97= ?

3. 3. nordtorp Said：

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

4. 4. nordtorp Said：

6 = (2 + 2/2)!

5. 5. Euclid's Brother Said：

Has noone noticed that #2 above wrong?

6. 6. Curtis Said：

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

7. 7. Wizard of Oz Said：

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!

8. 8. nordtorp Said：

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.

9. 9. nordtorp Said：

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.

10. 10. BearSprite Said：

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).

11. 11. Nathan Said：

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

12. 12. Jun Kie Said：

I don’t know, if it’s ok with the rules, but here it is:
12 = sqr(2)+sqr(2)+sqr(2)

13. 13. Jun Kie Said：

And #15:
15 = sqr(2)^2-2/2

14. 14. Random Guy Said：

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!

15. 15. Al Gelman Said：

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.

16. 16. nordtorp Said：

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.

17. 17. nordtorp Said：

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

18. 18. Wizard of Oz Said：

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.

19. 19. Nathan Said：

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

20. 20. Karl Sharman Said：

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

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

21. 21. Wizard of Oz Said：

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?

22. 22. Sarah Henson Said：

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!

23. 23. Al Gelman Said：

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.
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.

24. 24. Wizard of Oz Said：

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?

25. 25. memeandi Said：

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

26. 26. nordtorp Said：

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

27. 27. Marsha Said：

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

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

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

28. 28. Al Gelman Said：

That was a typo MARSHA, sorry about that. should be
2= (2/2) + (2/2)

29. 29. Jym Wright Said：

Dear Al — are the following solutions permissible?:

7 (2+2+2) + log2(2)
9 2(2+2) – log2(2)
15 (2+2)^2 – log2(2)
17 (2+2)^2 + log2(2)

**Sorry, I couldn’t follow the Dirac-based algorithm.

30. 30. Chris Said：

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 => log2 (2^2-N) = 2-N
Take logs base 2 once more => log2 2-N = -N

So N = – log2 log2 (√√…√√2 ) with N √ signs.

31. 31. Zoe Price Said：

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.

32. 32. Karl Sharman Said：
33. 33. nandharaj Said：

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

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_mssql.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_pdo_mssql.dll' - The specified module could not be found. in Unknown on line 0