  For a class of viable cosmological models in $f(R)$ gravity which deviation
from the Einstein gravity decreases as a inverse power law of the Ricci scalar
$R$ for large $R$, an analytic solution for density perturbations in the matter
component during the matter dominated stage is obtained in terms of
hypergeometric functions. An analytical expression for the matter transfer
function at scales much less than the present Hubble scale is also obtained.
