In an infinite sequence, $a_{0}=c$ and

$$
a_{n}=2\left(a_{n-1}-1\right)^{2} \quad n=1,2, \ldots
$$

Determine $a_{n}$ as a function of $c$ and $n$.
Let $A_{n}=2\left(a_{n}-1\right)$, then $A_{0}=2(c-1)=C$, and

$$
A_{n}=A_{n-1}^{2}-2 \quad n=1,2, \ldots
$$

We seek $A_{n}$ in the form $A_{n}=P_{n}+Q_{n}$. The recurrence for the components is

$$
P_{n}+Q_{n}=P_{n-1}^{2}+Q_{n-1}^{2}+2\left(P_{n-1} Q_{n-1}-1\right)
$$

We could solve this recurrence if we could ensure that the last term vanishes for all $n$:

$$
P_{n-1} Q_{n-1}=1
$$

This is satisfied if we ensure that (3) holds term by term

$$
\text { (3a) } \quad P_{n}=P_{n-1}^{2} ; \quad \text { (3b) } \quad Q_{n}=Q_{n-1}^{2}
$$

Indeed, if (4) holds for some $n$, then by (3a) and (3b) it also holds for $(n+1)$.

Let $P_{0}, Q_{0}$ be the solution to the system

$$
\begin{aligned}
& P_{0} Q_{0}=1 \\
& P_{0}+Q_{0}=C
\end{aligned}
$$

This system is solvable for any $C$ if we allow complex numbers as solutions. Starting from these $P_{0}, Q_{0}$, we generate the numbers $P_{n}, Q_{n}$ using the rules (3a), (3b). For these, (4) will hold for all $n$, and the sequence $A_{n}=P_{n}+Q_{n}$ will satisfy (2). It is easy to see that according to (3a), (3b),

$$
\left.P_{n}=P_{0}^{2^{n}}, \quad Q_{n}=Q_{0}^{2^{n}}+1\right)
$$

Thus,

$$
a_{n}=\frac{1}{2}\left(P_{0}^{2^{n}}+Q_{0}^{2^{\underline{n}}}\right.
$$

where $P_{0}, Q_{0}$ are the roots of (5), and in (5) $C=2 c-2$.