I am wondering how many nonnegative solutions the following Diophantine equation has: $$x_1+x_2+x_3+\dots+x_n=r$$ if $x_1 \leq x_2 \leq x_3 \leq \dots \leq x_n$
I know if a sequence can be non-decreasing answer is $ {n+r-1}\choose{r} $
Can I use this fact to solve the problem? Thanks for help!
You're asking for the number of integer partitions with up to $n$ parts whose sum is $r$. (If $r < n$, then some of the $x_i$ must be 0.) The triangle of values is given in the On-Line Encyclopedia of Integer Sequences as A026820 (which uses $n$ for your $r$ and $k$ for your $n$). If you express this as a sum of partition counts with exactly $k$ parts A008284, you can generate an expression in terms of $p(n)$, the number of partitions of $n$, although this has no simple closed form.
The binomial coefficient $\binom{n+r-1}{r}$ would be relevant without the restriction that $x_1 \le x_2 \le \cdots \le x_n$. In that case you would be dealing with integer compositions, which are often easier to analyze than partitions.