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 »
UndeadPrivateer · 31-35, M
@SW-User Hahaha, we basically did this exercise in one of my programming classes. My sleep deprived brain doesn't feel like mathing right now though. :P
sumojumo · 36-40, M
@UndeadPrivateer indeed, it is a common example of how to generate all expression trees, or similar.
UndeadPrivateer · 31-35, M
@sumojumo [i]Precisely.[/i]
SW-User
@UndeadPrivateer always up late studying 😁