15. Given the function $f(x)=a_{1} x+a_{2} x^{2}+\cdots+a_{n} x^{n}$
$\left(n \in \mathbf{N}_{+}\right), a_{1}, a_{2}, \cdots, a_{n}$ are terms of a sequence. If $f(1)=n^{2}+1$, (1) find the general term formula of the sequence $\left\{a_{n}\right\}$; (2) find $\lim _{n \rightarrow \infty}\left(1-\frac{1}{a_{n}}\right)^{n}$.
15. (1) $f(1)=a_{1}+a_{2}+\cdots+a_{n}=n^{2}+1\left(n \in \mathbf{N}_{+}\right)$, then $a_{1}=2, a_{n}=2 n-1(n \geqslant 2$, $n \in \mathbf{N}_{+}$);
(2)
$\lim _{n \rightarrow+\infty}\left(1-\frac{1}{a_{n}}\right)^{n}=\lim _{n \rightarrow+\infty}\left(1-\frac{1}{2 n-1}\right)^{n}=\lim _{n \rightarrow+\infty}\left(\frac{2 n-2}{2 n-1}\right)^{n}=\lim _{n \rightarrow \infty}\left(\frac{1-\frac{1}{n}}{1-\frac{1}{2 n}}\right)^{n}$
$$
=\lim _{n \rightarrow+\infty} \frac{\left(1-\frac{1}{2 n}\right)^{-n}}{\left(1-\frac{1}{n}\right)^{-n}}=e^{-\frac{1}{2}} .
$$