3. Arrange $1,2, \cdots, k$ in a row so that each number is strictly greater than all the numbers preceding it, or strictly less than all the numbers preceding it. Let the number of different arrangements be $a_{k}(k=1,2, \cdots)$. Then $a_{n}=$ $\qquad$
3. $2^{n-1}$.

For the $n$-th position being 1 or $n$, regardless of which it is, the remaining $n-1$ positions have $a_{n-1}$ arrangements, thus
$$
\begin{array}{l}
a_{n}=2 a_{n-1} . \\
\text { and } a_{1}=1, \text { therefore } a_{n}=2^{n-1} .
\end{array}
$$