295. Find the coefficient of $x^{50}$ after expanding the brackets and combining like terms in the expressions:

a) $(1+x)^{1000}+x(1+x)^{999}+x^{2}(1+x)^{998}+\ldots+x^{1000}$;

b) $(1+x)+2(1+x)^{2}+3(1+x)^{3}+\ldots+1000(1+x)^{1000}$.
295. a) According to the formula for the sum of a geometric progression and the binomial formula of Newton, we have:

$(1+x)^{1000}+x(1+x)^{999}+x^{2}(1+x)^{998}+\ldots+x^{1000}=$

$$
\begin{gathered}
=\frac{\frac{x^{1001}}{1+x}-(1+x)^{1000}}{\frac{x}{1+x}-1}=\frac{x^{1001}-(1+x)^{1001}}{x-1-x}=(1+x)^{1001}-x^{1001}= \\
=1+1001 x+C_{1001}^{2} x^{2}+C_{1001}^{3} x^{3}+\ldots+1001 x^{1000}
\end{gathered}
$$

Thus, the required coefficient is $C_{1001}^{50}=\frac{1001!}{50!\cdot 951!}$.

b) Let's denote our expression by $P(x)$. Then we have:

$$
\begin{aligned}
& (1+x) P(x)-P(x)=\left[(1+x)^{2}+2(1+x)^{3}+\ldots\right. \\
& \left.\ldots+999(1+x)^{1000}+1000(1+x)^{1001}\right]-\left[(1+x)+2(1+x)^{2}+\right. \\
& \left.\quad+3(1+x)^{3}+\ldots+1000(1+x)^{1000}\right]=1000(1+x)^{1001}- \\
& -\left[(1+x)+(1+x)^{2}+(1+x)^{3}+\ldots+(1+x)^{1000}\right]=1000(1+x)^{1001}- \\
& -\frac{(1+x)^{1001}-(1+x)}{1+x-1}=1000(1+x)^{1001}-\frac{(1+x)^{1001}-(1+x)}{x}
\end{aligned}
$$

From this,

$$
\begin{aligned}
P(x)= & \frac{1000(1+x)^{1001}}{x}-\frac{(1+x)^{1001}-(1+x)}{x^{2}}= \\
= & 1000\left[1001+C_{1001}^{2} x+C_{1001}^{3} x^{2}+\ldots+1001 x^{999}+x^{1000}\right]- \\
& \quad-\left[C_{1001}^{2}+C_{1001}^{3} x+C_{1001}^{4} x^{2}+\ldots+1001 x^{998}+x^{899}\right]
\end{aligned}
$$

Thus, the required coefficient is

$$
\begin{aligned}
1000 C_{1001}^{51}-C_{1001}^{52} & =\frac{1000 \cdot 1001!}{51!\cdot 950!}-\frac{1001!}{52!\cdot 949!}= \\
& =\frac{1001!}{52!\cdot 950!}[52 \cdot 1000-950]=\frac{51050 \cdot 1001!}{52!\cdot 950!}
\end{aligned}
$$