  Let $h_n(v)$ be the sequence of rational functions with $$
\frac{h_n(v)}{v}-nh_n(v)+(n-1)h_{n-1}(v)-vh_{n-1}'(v)+\frac{v(v(vh_{n-1}(v))')'}{4}=0
$$ for $n>0$ and $h_0(v)=1$. We prove that $h_n(v)$ has a pole at
$v=\frac{1}{n}$ if and only if $n$ is a sum of two squares of integers.
Moreover, if $r_2(n)=\#\{(a,b)\in \mathbb Z^2: a^2+b^2=n\}$, then we derive the
formula $$ \underset{v=1/n}{\mathrm{Res}}h_n(v)=\frac{(-1)^{n-1}r_2(n)}{n16^n}.
$$ The results are then generalized to arbitrary modular forms with respect to
$\Gamma(2)$ and as a consequence we obtain a new criterion for Lehmer's
conjecture for Ramanujan's $\tau$-function.
