  We propose a novel modular anomaly equation for the unflavored Schur index in
the $\mathcal{N}=4$ $SU(N)$ super-Yang-Mills theory. The vanishing conditions
overdetermine the modular ambiguity ansatz from the equation, thus together
they are sufficient to recursively compute the exact Schur indices for all
$SU(N)$ gauge groups. Using the representations as MacMahon's generalized
sum-of-divisors functions and Jacobi forms, we then prove our proposal as well
as elucidate a general formula conjectured by Pan and Peelaers.
