  In 1961, Rankin determined the asymptotic behavior of the number $S_{k,q}(x)$
of positive integers $n\le x$ for which a given prime $q$ does not divide
$\sigma_k(n),$ the $k$-th divisor sum function. By computing the associated
Euler-Kronecker constant $\gamma_{k,q},$ which depends on the arithmetic of
certain subfields of $\mathbb Q(\zeta_q)$, we obtain the second order term in
the asymptotic expansion of $S_{k,q}(x).$ Using a method developed by Ford,
Luca and Moree (2014), we determine the pairs $(k,q)$ with $(k, q-1)=1$ for
which Ramanujan's approximation to $S_{k,q}(x)$ is better than Landau's. This
entails checking whether $\gamma_{k,q}<1/2$ or not, and requires a substantial
computational number theoretic input and extensive computer usage. We apply our
results to study the non-divisibility of Fourier coefficients of six cusp forms
by certain exceptional primes, extending the earlier work of Moree (2004), who
disproved several claims made by Ramanujan on the non-divisibility of the
Ramanujan tau function by five such exceptional primes.
