2

How many different (distinct $x_i$) non-negative integer solutions does the equation $x_1 + x_2 + ...+ x_r = n$ have?

We know that it has $n+r-1 \choose r-1$ non negative solutions. But how many are different?

actually I want to solve this problem... choose 5 card from 13 cards that every cards marked with number 1 to 13 . how many way sum of chosen cards if greater than 40. so i want to know how many distinct solution that equation has. because we have only one card from each one.

then i'm going to calculate this for n= 41 to 55

N. F. Taussig
  • 76,571

2 Answers2

1

Hint: The question addressing the special case $r=13, 41\leq n \leq 65$ already has an answer here.

Markus Scheuer
  • 108,315
0

use generating functions, consider integer $i$ can be chosen or not. If we choose it, it contributes $yx^i$ ; if not it contributes $1$. so the answer is

$$r![x^ny^r]\prod_{i=0}^n(1+yx^i)$$

use ferrers diagram we can prove that $$[y^r]\prod_{i=1}^n(1+yx^i)=\prod_{i=1}^r\frac{x^i}{1-x^i}$$

Here is my Mathematica code:

Coefficient[
 Series[Product[x^i/(1 - x^i), {i, 1, r}] + 
   Product[x^i/(1 - x^i), {i, 1, r - 1}], {x, 0, n}], x, n] r!