F(R) theories with torsion: mathematical features