7. Let $p(x)$ be a polynomial of degree $2n$, satisfying $p(0)=$ $p(2)=\cdots=p(2 n)=0, p(1)=p(3)=\cdots=p$ $(2 n-1)=2$ and $p(2 n+1)=-30$. Find $n$ and $p(x)$.
7. Analysis: Let $Q(x)=p(x)-1$, then $Q(k)=(-1)^{k+1}, k=0,1,2, \cdots, 2 n$. By the Lagrange interpolation polynomial, we have $Q(x)=\sum_{k=0}^{2 n} Q(k)$
$$
\frac{\left(x-x_{0}\right) \cdots\left(x-x_{k-1}\right)\left(x-x_{k+1}\right) \cdots\left(x-x_{2 n}\right)}{\left(x_{k}-x_{0}\right) \cdots\left(x_{k}-x_{k-1}\right)\left(x_{k}-x_{k+1}\right) \cdots\left(x_{k}-x_{2 n}\right)},
$$
where $x_{k}=k, k=0,1,2 \cdots, 2 n$. Substituting $x=2 n+1$ into the above expression, we get
$$
\begin{array}{l}
Q(2 n+1)=\sum_{k=0}^{2 n}(-1)^{k+1} \\
\frac{(2 n+1) \cdots(2 n+1-k+1)(2 n+1-k-1) \cdots(2 n+1-2 n)}{k(k-1) \cdots 1 \cdot(-1)(-2) \cdots(-(2 n-k))} \\
=\sum_{k=0}^{2 n}(-1)^{k+1}(-1)^{2 n-k} . \\
\frac{(2 n+1) \cdots(2 n+2-k)(2 n-k) \cdots 1}{k!(2 n-k) \cdots 1} \\
=\sum_{k=0}^{2 n}(-1)^{2 n+1} \frac{(2 n+1) \cdots(2 n+1-k+1)}{k!} \\
=-\sum_{k=0}^{2 n}\binom{2 n+1}{k}=-\sum_{k=0}^{2 n+1}\binom{2 n+1}{k}+1 \\
=-2^{2 n+1}+1 .
\end{array}
$$

Therefore, $p(2 n+1)=Q(2 n+1)+1=2-2 \cdot 4^{n}$. Given that $p(2 n+1)=-30$,
we have $2-2 \cdot 4^{n}=-30$, solving for $n$ gives $n=2$.
Let $p(x)=a x^{2}+b x+c$, then
$$
\left\{\begin{array}{l}
p(0)=c=0, \\
p(1)=a+b+c=2, \\
p(2)=4 a+2 b+c=0 .
\end{array}\right.
$$

Solving these equations, we get $a=-2, b=4, c=0$, thus $p(x)=-2 x^{2}+4 x$.