  In this article, we consider the Diophantine equation
$\sigma_{2}(n)-n^2=An+B$ with $A=P^2\pm2$. For some $B$, we show that except
for finitely many computable solutions in the range $n\leq(|A|+|B|)^{3}$, all
the solutions are expressible in terms of Lucas sequences. Meanwhile, we obtain
some results relating to other linear recurrent sequences.
