5. Let $P_{1}$ and $P_{2}$ be two points on a plane, $P_{2 k+1}$ be the point symmetric to $P_{2 k}$ with respect to $P_{1}$, and $P_{2 k+2}$ be the point symmetric to $P_{2 k+1}$ with respect to $P_{2}$, $k \in \mathbf{Z}_{+}$. If $\left|P_{1} P_{2}\right|=1$, then $\left|P_{2017} P_{2018}\right|=$ $\qquad$
5.4032.

Let the complex number corresponding to point $P_{n}$ be $z_{n}$.
According to the problem, we have
$$
\begin{array}{l}
z_{2 k+1}+z_{2 k}=2 z_{1}, \\
z_{2 k+1}+z_{2 k+2}=2 z_{2}. \\
\text { Then } z_{2 k+2}-z_{2 k}=2\left(z_{2}-z_{1}\right) \\
\Rightarrow z_{2 k+2}=z_{2}+2 k\left(z_{2}-z_{1}\right). \\
\text { Therefore, }\left|P_{2 k+1} P_{2 k+2}\right|=\left|z_{2 k+2}-z_{2 k+1}\right| \\
=\left|2 z_{2 k+2}-2 z_{2}\right|=\left|4 k\left(z_{2}-z_{1}\right)\right|=4 k \\
\Rightarrow\left|P_{2017} P_{2018}\right|=4032.
\end{array}
$$