On the representations of the groups SO(3), O(2, 1), and M(2) defined in terms of Lamé, Mathieu, and parabolic functions