TITLE: How many ordered quadruples of positive integers $\{a,b,c,d\}$ are there such that $a\leq b\leq c\leq d\leq 50$ and $a+b+c+d=100$?
QUESTION [10 upvotes]: How many set of positive integers $\{a,b,c,d\}$ are there such that $ a\leq b\leq c\leq d\leq 50$ and $a+b+c+d=100$? 
I was thinking about using stars and bars, and it seems to work if there were only three variables:
If $a\leq b\leq c\leq 50$ and $a+b+c=100$, then we can define $x=50-a,y=50-b,z=50-c$ such that $x,y,z\leq 50$ and $x+y+z=3\times 50-(a+b+c)=50$. Then we can simply use stars and bars to find the number of triples of $\{x,y,z\}$, each of which corresponds to a unique $\{a,b,c\}$.
If $x\neq y,y\neq z$, and $z\neq x$, then only one out of the six sets consisting of $x,y,$ and $z$ is listed from the smallest to the largest. Since $50$ is not a multiple of $3$, $x=y=z$ is not possible. If two of the three elements are the same, then this element can be any integer between $1$ and $24$, inclusive. Since it can be either $x=y\neq z$, $x=z\neq y$, or $y=z\neq x$, each case appears three times. Thus, the total number of ordered triples $\{a,b,c\}$ is $\dfrac{C_{49}^2-24\times 3}{6}+24$.
However, when there's a fourth variable $d$, this method doesn't seem to work. Are there any other ways to circumvent it? Sorry for my poor English.

REPLY [6 votes]: In the   following   answer   (which was  slightly  more  cumbersome  than I had expected) we use the coefficient of operator $[z^n]$ to denote the coefficient of $z^n$ in a series. This way we can formulate the problem as  finding the coefficient of $z^{100}$ in the sum below and doing somewhat coefficient extraction.
\begin{align*}
[z^{100}]\sum_{1\leq a\leq b\leq c\leq d\leq 50}z^{a+b+c+d}\tag{1}
\end{align*}

We obtain
  \begin{align*}
\color{blue}{[z^{100}]}&\color{blue}{\sum_{1\leq a\leq b\leq c\leq d\leq 50}z^{a+b+c+d}}\\
&=[z^{100}]\sum_{a=1}^{50}\,\sum_{b=a}^{50}\,\sum_{c=b}^{50}\,\sum_{d=c}^{50}z^{a+b+c+d}\tag{2}\\
&=[z^{100}]\sum_{a=0}^{49}\,\sum_{b=0}^{49-a}\,\sum_{c=0}^{49-a-b}\,\sum_{d=0}^{49-a-b-c}z^{4a+3b+2c+d+4}\tag{3}\\
&=[z^{96}]\sum_{a=0}^{49}\,\sum_{b=0}^{49-a}\,\sum_{c=0}^{49-a-b}z^{4a+3b+2c}\,\frac{1-z^{50-a-b-c}}{1-z}\tag{4}\\
&=[z^{96}]\frac{1}{1-z}\sum_{a=0}^{49}\,\sum_{b=0}^{49-a}z^{4a+3b}\,\sum_{c=0}^{49-a-b}z^{2c}\\
&\qquad-[z^{46}]\frac{1}{1-z}\sum_{a=0}^{49}\,\sum_{b=0}^{49-a}z^{3a+2b}\,\sum_{c=0}^{49-a-b}z^{c}\tag{5}\\
&=[z^{96}]\frac{1}{1-z}\sum_{a=0}^{49}\,\sum_{b=0}^{49-a}z^{4a+3b}\,\frac{1-z^{100-2a-2b}}{1-z^2}\\
&\qquad-[z^{46}]\frac{1}{1-z}\sum_{a=0}^{49}\,\sum_{b=0}^{49-a}z^{3a+2b}\,\frac{1-z^{50-a-b}}{1-z}\tag{6}\\
&=[z^{96}]\frac{1}{(1-z)(1-z^2)}\sum_{a=0}^{49}z^{4a}\,\sum_{b=0}^{49-a}z^{3b}\\
&\qquad-[z^{46}]\frac{1}{(1-z)^2}\sum_{a=0}^{49}z^{3a}\,\sum_{b=0}^{49-a}z^{2b}\tag{7}\\
&=[z^{96}]\frac{1}{(1-z)(1-z^2)}\sum_{a=0}^{49}z^{4a}\,\frac{1-z^{150-3a}}{1-z^3}\\
&\qquad-[z^{46}]\frac{1}{(1-z)^2}\sum_{a=0}^{49}z^{3a}\,\frac{1-z^{100-2a}}{1-z^2}\tag{8}\\
&=[z^{96}]\frac{1}{(1-z)(1-z^2)(1-z^3)}\,\frac{1-z^{200}}{1-z^4}\\
&\qquad-[z^{46}]\frac{1}{(1-z)^2(1-z^2)}\,\frac{1-z^{150}}{1-z^3}\tag{9}\\
&\,\,\color{blue}{=[z^{96}]\frac{1}{(1-z)(1-z^2)(1-z^3)(1-z^4)}}\\
&\qquad\color{blue}{-[z^{46}]\frac{1}{(1-z)^2(1-z^2)(1-z^3)}}\tag{10}\\
\end{align*}
\begin{align*}
&=[z^{96}]\left(\frac{1-z^2}{9(1-z^3)}+\frac{1}{8(1+z^2)}+\frac{4z+5}{32(1+z)^2}\right.\\
&\qquad\qquad\qquad\left.-\frac{68z^3-263z^2+358z-175}{288(1-z)^4}\right)\\
&\qquad-[z^{46}]\left(\frac{1-z^2}{9(1-z^3)}+\frac{1}{16(1+z)}\right.\\
&\qquad\qquad\left.-\frac{25z^3-109z^2+179z-119}{144(1-z)^4}\right)\tag{11}\\
&=\frac{1}{9}[z^{96}](1-z^2)\sum_{j=0}^{\infty}z^{3j}+\frac{1}{8}[z^{96}]\sum_{j=0}^{\infty} (-1)^jz^{2j}\\
&\qquad+\frac{1}{32}[z^{96}](4z+5)\sum_{j=0}^{\infty} (j+1)(-1)^jz^j\\
&\qquad-\frac{1}{288}[z^{96}]\left(68z^3-263z^2+358z-175\right)\sum_{j=0}^{\infty}\binom{j+3}{3}z^j\\
&\qquad+\frac{1}{9}[z^{46}](1-z^2)\sum_{j=0}^{\infty}z^{3j}-\frac{1}{16}[z^{46}]\sum_{j=0}^{\infty}(-1)^jz^j\\
&\qquad+\frac{1}{144}[z^{46}]\left(25z^3-109z^2+179z-119\right)\sum_{j=0}^{\infty}\binom{j+3}{3}z^j\tag{12}\\
&=\frac{1}{9}+\frac{1}{8}+\frac{1}{32}\left(-4\cdot 96+5\cdot 97\right)\\
&\qquad-\frac{1}{288}\left(68\binom{96}{3}-263\binom{97}{3}+358\binom{98}{3}-175\binom{99}{3}\right)\\
&\qquad+0-\frac{1}{16}\\
&\qquad\qquad+\frac{1}{144}\left(25\binom{47}{4}-109\binom{48}{4}
+179\binom{49}{4}-119\binom{50}{4}\right)\tag{13}\\
&=\left(\frac{1}{9}+\frac{1}{8}+\frac{101}{32}+\frac{2\,059\,087}{288}\right)-\left(\frac{1}{16}+\frac{484\,407}{144}\right)\\
&=7\,153-3\,364\\
&\,\,\color{blue}{=3\,789}
\end{align*}
in accordance with the result stated by @antkam.

Comment:

In (2) we write the sums more conveniently as preparation for the following transformations.
In (3) we transform the indices so that they start from $0$. This is done by 
\begin{align*}
a\to a+1,\quad b\to b-a-1,\quad c\to c-b-a-1,\quad d\to d-c-b-a-1
\end{align*}
In (4) we factor out $z^4$, apply the rule $[z^p]z^qA(z)=[z^{p-q}]A(z)$ and use the finite geometric summation formula for the inner most sum.
In (5) we split the sums and do some rearrangements as preparation for the next appliction of the finite geometric summation formula.
In (6) we apply the geometric summation formula as we did in (4).
In (7) we skip the terms containing the factor $z^{100}$ and $z^{50}$ as they do not contribute to the wanted coefficients.
In (8) to (10) we work similarly as we did before.
In (11)  we do a partial fraction expansion (admittedly with some help of Wolfram Alpha) which helps to extract the coefficients easily.
In (12) we do geometric  and binomial series expansions.
In (13) we select the coefficients accordingly.