Ky Fan theorem applied to Randić energy