4. In the right prism $A B C-A_{1} B_{1} C_{1}$, the side length of the square $A A_{1} C_{1} C$ is 4, the plane $A B C \perp$ plane $A A_{1} C_{1} C, A B=$ $3, B C=5$. If there is a point $D$ on the line segment $B C_{1}$ such that $A D \perp A_{1} B$, then the value of $\frac{B D}{B C_{1}}$ is
4. $\frac{9}{25}$.

Establish a spatial rectangular coordinate system with $\overrightarrow{A C}$ as the $x$-axis, $\overrightarrow{A B}$ as the $y$-axis, and $\overrightarrow{A A_{1}}$ as the $z$-axis. Let $D(x, y, z)$ be a point on the line segment $B C_{1}$, and $\overrightarrow{B D}=\lambda \overrightarrow{B C_{1}}$.
From $\overrightarrow{A D} \cdot \overrightarrow{A_{1} B}=0 \Rightarrow \frac{B D}{B C_{1}}=\lambda=\frac{9}{25}$.