4. Including A, six people pass the ball to each other. The ball is passed from one person to another each time, starting with A. The total number of ways for the ball to return to A after six passes is $\qquad$ .
4. 2605 .

Let the number of ways the ball returns to player A after $n$ passes be $a_{n}$.

Considering the number of ways the ball returns to A after $n+1$ passes, $a_{n+1}$, the sum of the number of ways the ball is not with A after $n$ passes and the number of ways the ball is with A after $n$ passes is exactly the total number of ways after $n$ passes, $5^{n}$, that is
$$
\begin{array}{l}
a_{n+1}=5^{n}-a_{n} . \\
\text { Since } a_{1}=0, a_{2}=5 \text {, then } \\
a_{3}=20, a_{4}=105, a_{5}=520, a_{6}=2605 .
\end{array}
$$