Take the 2-minute tour ×
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.

What is the total number of solutions of an equation of the form $x_1 + x_2 + \cdots + x_r = m$ such that $1 \le x_1 < x_2 < \cdots < x_r < N$ where $N$ is some natural number and $x_1, x_2, \cdots, x_r, m$ are integers?

Also, what would be the solution in the relaxed case where $x_1, x_2, x_3, \dots, x_r$ could be equal?

share|improve this question
    
Looks like a restricted partition function, and will not have an easy formula. –  anon May 1 '12 at 22:43
    
Is $r{}$ fixed? –  Gerry Myerson May 1 '12 at 23:21
    
yes, r is fixed. –  Randomks May 2 '12 at 5:40
add comment

1 Answer

Presumably $m \ge 0$. Here are two ways of getting your answer.

1) If $F(N,m)$ is the number of such solutions, then by conditioning on the value of $x_r$ we have

$$F(N,m) = \sum_{x=1}^{\min(m,N-1)} F(x,m-x)\ \text{for}\ m \ge 1$$

with $F(N,0) = 1$, $F(1,m) = 0$ for $m \ge 1$.

2) $F(N,m)$ is the coefficient of $x^m$ in $\prod_{j=1}^{N-1} (1+x^j)$.

See also http://oeis.org/A053632.

share|improve this answer
add comment

Your Answer

 
discard

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.