## As Easy As 1234

#### Problem

Using each of the digits 1, 2, 3, and 4, once and only once, with the basic rules of arithmetic (+, –, , ÷, and parentheses), express all of the integers from 1 to 25.

For example, 1 = 2 3 – (1 + 4)

#### Solution

Of course, there are may be other ways of arriving at each of these numbers:

 1 = 2 3 – (1 + 4)
 14 = 1 4 3 + 2
 2 = 4 – 3 + 2 – 1
 15 = 3 4 + 1 + 2
 3 = 2 3 – (4 – 1)
 16 = 2(1 + 3 + 4)
 4 = 2 4 – (1 + 3)
 17 = 3(2 + 4) – 1
 5 = 2 4 – 1 3
 18 = 3(2 + 4) 1
 6 = 2 4 – 3 + 1
 19 = 3(2 + 4) + 1
 7 = 3(4 – 1) – 2
 20 = 1 4 (2 + 3)
 8 = 2 + 3 + 4 – 1
 21 = 4(2 + 3) + 1
 9 = 2 3 + (4 – 1)
 22 = 2(3 4 – 1)
 10 = 1 + 2 + 3 + 4
 23 = 3 4 2 – 1
 11 = 2 3 + (1 + 4)
 24 = 1 2 3 4
 12 = 3 4 (2 – 1)
 25 = 2 3 4 + 1
 13 = 3 4 + 1 + 2

Extensions

• If you are now permitted to use square roots, exponents, and factorials, can you produce all of the integers from 1 to 100?
• What is the first natural number that cannot be derived?
• Which is the first number that cannot be obtained if you are only permitted to use the basic rules of arithmetic (+, –, , and ÷)?
• What is the largest known prime you can produce?

Notes

Surprisingly it is possible to produce any finite integer using logarithms in a rather ingenious way.

We can see that,

2 = 21/2
2 = (21/2)1/2 = 21/4
2 = ((21/2)1/2)1/2 = 21/8, and so on.

Therefore,

log2(2) = 1/2 = (1/2)1
log2(2) = 1/4 = (1/2)2
log2(2) = 1/8 = (1/2)3, et cetera.

Hence,

log1/2(log2(2)) = 1
log1/2(log2(2)) = 2
log1/2(log2(2)) = 3, ...

By using the integer part function, 1/[(3!)] = 1/[2.449...] = 1/2, we can obtain the required base 1/2, and using 4 to obtain the base 2, we can now produce any finite integer using the digits 1, 2, 3, and 4.

log(1/[(3!)])(log4(2)) = 1
log(1/[(3!)])(log4(2)) = 2
log(1/[(3!)])(log4(2)) = 3, ...

Problem ID: 13 (Sep 2000)     Difficulty: 1 Star

Only Show Problem