12. Given $\left\{a_{n}\right\}$ is an arithmetic sequence with a common difference of $d(d \neq 0)$, and $a_{1}+t^{2}=a_{2}+t^{3}=a_{3}+t$.
(1) Find the values of the real numbers $t, d$;
(2) If positive integers satisfy $m<p<r, a_{m}-2 t^{m}=a_{p}-2 t^{p}=a_{r}-2 t^{r}=0$, find the array $(m, p, r)$ and the corresponding general term formula $a_{n}$.
(1) From the problem, we have
\[
\left\{
\begin{array}{l}
a_{1} + t^{2} = a_{1} + d + t^{3} \\
a_{1} + d + t^{3} = a_{1} + 2d + t
\end{array}
\right.
\]
which simplifies to
\[
\left\{
\begin{array}{l}
d = t^{2} - t^{3} \\
d = t^{3} - t
\end{array}
\right.
\]
Since \( d \neq 0 \), we have \( t \neq 0 \) and \( t \neq 1 \). Solving \( 2t^{2} - t - 1 = 0 \) gives \( t = -\frac{1}{2} \) and \( d = \frac{3}{8} \);
(10 points)

(2) From
\[
a_{m} - 2t^{m} = a_{p} - 2t^{p} = a_{r} - 2t^{r} = 0, \quad t = -\frac{1}{2}, \quad d = \frac{3}{8}
\]

we get
\[
(p - m)d = 2\left[\left(-\frac{1}{2}\right)^{p} - \left(-\frac{1}{2}\right)^{m}\right] \quad \text{and} \quad (r - p)d = 2\left[\left(-\frac{1}{2}\right)^{r} - \left(-\frac{1}{2}\right)^{p}\right]
\]

which simplifies to
\[
\frac{3}{8}(p - m) = 2\left[\left(-\frac{1}{2}\right)^{p} - \left(-\frac{1}{2}\right)^{m}\right] \quad \text{and} \quad \frac{3}{8}(r - p) = 2\left[\left(-\frac{1}{2}\right)^{r} - \left(-\frac{1}{2}\right)^{p}\right]
\]

or
\[
3(p - m) = 2^{4}\left[\left(-\frac{1}{2}\right)^{p} - \left(-\frac{1}{2}\right)^{m}\right] \quad \text{and} \quad 3(r - p) = 2^{4}\left[\left(-\frac{1}{2}\right)^{r} - \left(-\frac{1}{2}\right)^{p}\right]
\]

Both left sides are positive integers, so \( m < p < r \leq 4 \), and \( m \) and \( p \) are odd numbers. Therefore, \( m = 1 \), \( p = 3 \), \( r = 4 \), and \( a_{1} = -1 \).
Verification:
\[
\begin{array}{l}
a_{1} - 2\left(-\frac{1}{2}\right) = -1 - 2\left(-\frac{1}{2}\right) = 0 \\
a_{3} - 2\left(-\frac{1}{2}\right)^{3} = \frac{9}{8} - \frac{11}{8} - 2\left(-\frac{1}{2}\right)^{3} = 0 \\
a_{4} - 2\left(-\frac{1}{2}\right)^{4} = \frac{12}{8} - \frac{11}{8} - 2\left(-\frac{1}{2}\right)^{4} = 0
\end{array}
\]

Thus, \((m, p, r) = (1, 3, 4)\) and \( a_{n} = -1 + \frac{3}{8}(n - 1) = \frac{3}{8}n - \frac{11}{8} \).
(20 points)