3. Given the function
$$
f(x)=\left\{\begin{array}{ll}
(3-a) x-3, & x \leqslant 7 ; \\
a^{x-6}, & x>7,
\end{array}\right.
$$

The sequence $\left\{a_{n}\right\}$ satisfies $a_{n}=f(n)\left(n \in \mathbf{N}_{+}\right)$, and $\left\{a_{n}\right\}$ is an increasing sequence. Then the range of the real number $a$ is ( ).
(A) $\left(\frac{9}{4}, 3\right)$
(B) $\left[\frac{9}{4}, 3\right)$
(C) $(1,3)$
(D) $(2,3)$
3. D.

From $\left\{a_{n}\right\}$ being an increasing sequence, we get
$$
\left\{\begin{array}{l}
3-a>0, \\
a>1
\end{array} \Rightarrow 12$. Therefore, the range of real number $a$ is $(2,3)$.