Only logged in members can reply and interact with the post.
Join SimilarWorlds for FREE »

All numbers with only one number

You want to express numbers with only one number and certain operations. As an example, let us say you have addition, multiplication, subtraction, and division (and you are allowed to use parenthesis). And you only have five numbers 2 available. You can express the numbers 1 to 10 in the following way:


Your task is to do the same, but instead of number 2, use number 5, i.e. express numbers 1 to 10 with exactly five numbers 5 and combining them with four allowed operations: addition, multiplication, subtraction, and division. You are also allowed to use parentheses.

[b]BONUS:[/b] Can you do it also for the number 23?

The best solution gets a token of appreciation...
This page is a permanent link to the reply below and its nested replies. See all post replies »
CopperCicada · M Best Comment
1 = 5 - (((5 x 5) - 5)/5)
2 = 5 - ((5 + 5 +5)/5)
3 = ((5 + 5)/5) + (5/5)
4 = ((5 + 5 + 5 + 5)/5)
5 = (5 + 5 + 5) - (5 + 5)
6 = 5 + ((5 + 5)/(5 + 5))
7 = ((5 x 5) + (5 + 5))/5
8 = 5 + ((5 + 5 + 5)/5)
9 = ((5 + 5 + 5 + 5)/5) + 5
10 = (5 x 5) - (5 + 5 + 5)
sumojumo · 36-40, M
@CopperCicada congratulations, you were the first one to solve it, so you deserve the promised token of appreciation.

A little background of the riddle. It originates from an old book of riddles (mainly for kids) from the USSR called The Moscow Puzzles. It has been translated from Russian to English. But of course these types of riddles can be found in various contexts.

As you can see, there are plenty of different ways to express one number from 1 to 10, but number 23 (which I asked as a bonus question) is a bit special, because there is only one way how to do it.

If someone is willing to explore further, there is one number between 11 and 20 which cannot be expressed in this way (I hope I am not mistaken, since I do not have my computer at hand at the moment).

Thank to everyone for participating in this little game, I appreciate your effort.
@sumojumo I took the 23 thing wrong.

You said: [i]BONUS: Can you do it also for the number 23?[/i]

I took that to mean do the same for "5" as was done for "2" in the example.

The few that I got are easy.

2 = ((23 + 23) +/- (23 - 23))/23)
3 = (23 + 23 + 23 - 23)/23
4 = (23 + 23 + 23 + 23)/23

I'm stumped at the others so far.

They may not be possible.
sumojumo · 36-40, M
@CopperCicada it is quite possible that they are not possible. I will check tomorrow with my program that enumerates all options, so we will see what can be done.
@sumojumo I am more interested in the principles behind it.

The most generalized question is: How many copies, N, of number X, are required to represent a number Z, And then a related question-- to represent numbers 1 through Z.

If I pick a Z, then how are N and X constrained? If I pick a Z and X how is N constrained?
SW-User
@sumojumo was thinking you could probably write a pretty elegant solver in LISP for this
sumojumo · 36-40, M
@SW-User I have a solver in Sage (well python, mostly), but Lisp was born for such things :)
@sumojumo The reason I think there is some funky number theory under this is that I was able to represent 5^2 with five 23's but not 5. But then I was able to represent 5 with five 5's.
sumojumo · 36-40, M
@CopperCicada yes, there might quite as well be something fishy going on. This is a hard problem where actually quite interesting combinatorial patterns occur. I was playing around a little bit and a huge conundrum is starting to happen very quickly - so extrapolating any formulas is definitely not straightforward if not impossible in certain cases
sumojumo · 36-40, M
@CopperCicada Just to give you some feedback on 23 - it is actually not possible to do it with 23, no number between 5 and 10 can be done. But you can do 11,12, 20,21,..