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}$.