4. On the basketball court, there are 5 players practicing. Their tactic is: starting with player A, after 6 passes (with each player having an equal chance of passing and receiving the ball), the ball returns to A, who then attempts a 3-point shot. The number of different passing methods is ( ).
(A) 4100
(B) 1024
(C) 820
(D) 976
4.C.

Convert to coloring the vertices of a hexagon $A_{1} A_{2} A_{3} A_{4} A_{5} A_{6}$ using 5 colors, each point gets one color, the color of $A_{1}$ is fixed, and adjacent points must have different colors. How many coloring methods are there?
$$
\begin{array}{l}
\text { Given } a_{n}=\frac{m-1}{m}\left[(m-1)^{n-1}+(-1)^{n}\right], m \\
=5, n=6 \text {, we get } a_{6}=820 \text {. }
\end{array}
$$