25 Given that
$$
x+(1+x)^{2}+(1+x)^{3}+\ldots+(1+x)^{n}=a_{0}+a_{1} x+a_{2} x^{2}+\ldots+a_{n} x^{n},
$$
where each $a$, is an integer, $r=0,1,2, \ldots, n$.
Find the value of $n$ such that $a_{0}+a_{2}+a_{3}+a_{4}+\ldots+a_{n-2}+a_{n-1}=60-\frac{n(n+1)}{2}$.
25 Answer: (5)
Let $x=1$, we have $a_{0}+a_{1}+a_{2}+\ldots+a_{n}=1+2^{2}+2^{3}+\ldots+2^{n}=2^{n+1}-3$. Also, $a_{1}=1+2+3+\ldots+n=\frac{n(n+1)}{2}, a_{n}=1$, so $60-\frac{n(n+1)}{2}+\frac{n(n+1)}{2}+1=2^{n+1}-3 \Rightarrow n=5$.