5. Given $\overrightarrow{O P}=(2,1), \overrightarrow{O A}=(1,7), \overrightarrow{O B}=$ $(5,1)$. Let $C$ be a point on the line $O P$ ($O$ being the origin). When $\overrightarrow{C A} \cdot \overrightarrow{C B}$ reaches its minimum value, the coordinates of $\overrightarrow{O C}$ are $\qquad$
5. $(4,2)$.

From the problem, we know that vector $\overrightarrow{O C}$ is collinear with $\overrightarrow{O P}$.
Let's assume $\overrightarrow{O C}=t \overrightarrow{O P}$.
Then $\overrightarrow{O C}=t(2,1)=(2 t, t)$.
$\overrightarrow{C A}=\overrightarrow{O A}-\overrightarrow{O C}=(1-2 t, 7-t)$,
$\overrightarrow{C B}=\overrightarrow{O B}-\overrightarrow{O C}=(5-2 t, 1-t)$,
$\overrightarrow{C A} \cdot \overrightarrow{C B}=(1-2 t)(5-2 t)+(7-t)(1-t)$
$$
=5 t^{2}-20 t+12=5(t-2)^{2}-8 \text {. }
$$

Therefore, when $t=2$, $\overrightarrow{C A} \cdot \overrightarrow{C B}$ reaches its minimum value. At this time,
$$
\overrightarrow{O C}=(4,2)
$$