Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the maximum number of positive rational values that can be obtained by combining $k$ positive integers using only addition, subtraction, multiplication, division, and parentheses? Assume that each value must be used once and only once.

I believe that the sequence starts as follows: 1, 5, 47, 733, 15907, 443825.

The second term is 5 because we can form 5 different positive numbers from $\{a, b\}$ if $a > b$:

$$a+b,\ \ a-b,\ \ a\cdot b,\ \ \frac{a}b,\ \ \frac{b}a\ .$$

share|cite|improve this question
Are you allowing parentheses, e.g., $(a+b)c$? – Gerry Myerson Apr 12 '12 at 2:03
Yes, parentheses are allowed. – Dave Radcliffe Apr 12 '12 at 2:41
For what it's worth, the sequence without the positivity requirement is – Gerry Myerson Apr 12 '12 at 3:39
up vote 0 down vote accepted

I think that I have worked out a solution for my problem. An expression with $k \ge 2$ variables is either a sum of two or more products, or it is a product of two or more sums. I'm using the word "sum" broadly to include addition and subtraction, and "product" to include multiplication and division.

By iterating through all partitions of $k$, I obtained recurrences for the number of sum representations and the number of product representations. These recurrences allowed me to count the number of arithmetical combinations of 50 numbers in under three minutes.

My Python script is here:

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.