3. In the permutations of $1,2,3,4,5$ denoted as $a_{1}, a_{2}, a_{3}, a_{4}$, $a_{5}$, the number of permutations that satisfy $a_{1}a_{3}, a_{3}a_{5}$ is ( ).
(A) 24
(B) 16
(C) 10
(D) 8
3. B.

Obviously, $a_{2} 、 a_{4} \notin\{1,2\}$, so $1 、 2 \in\left\{a_{1}, a_{3}, a_{5}\right\}$.
If $a_{1}=1, a_{3}=2$, then $a_{2}$ has 3 choices, at this time $a_{4} 、 a_{5}$ are determined. Hence there are 3 choices.

Similarly, $a_{3}=2, a_{5}=1 ; a_{1}=2, a_{3}=1 ; a_{3}=1, a_{5}=2$ each have 3 choices.

If $a_{1}=1, a_{5}=2$, then $a_{3}=3$, at this time, $a_{2} 、 a_{4}$ have 2 choices.
Similarly, $a_{1}=2, a_{5}=1$ also has 2 choices.
In total, there are 16 permutations that satisfy the conditions.