1

I need to find the number of non negative solutions of equation $\underbrace{a+b+c+ \dotsb }_{n \text{ variables}}=N$ where $a\le b \le c \le d \le \dotsb $.

What I have tried is:

Suppose $S(n)$ gives us the required solution.

For $n=1$, only one solution $(a=N)$, $S(1)=1$

for $n=2$, $a+b=N$. $a$ can take either $0$ or non zero. if a takes 0 then total solutions = $S(1)=1$; otherwise, a can take values from 1 to N/2 so total floor(N/2) possible solutions. Hence $S(2)=S(1)+N/2 = 1 + N/2$

for $n=3, a+b+c=N$, a can take either 0 or non zero if a takes 0 then total solutions = $S(2)$ otherwise , a can take values from 1 to N/3 so total floor(N/3) possible solutions. Hence $S(3)= S(2) + N/3 = 1 + N/2 + N/3$

Similarly for $n=n$, $S(n)=1+ N/2 + N/3 + N/4 + ....... + N/n$

Can anyone tell whether the above formula is right or wrong?

Peter Taylor
  • 13,425

0 Answers0