We fulfilled a group foliation of the system of n-dimensional (n ≥ 2) Lame equations of the classical static theory of elasticity with respect to the infinite subgroup contained in normal subgroup of main group of this system. It permitted us to move from the Lame equations to the equivalent unification of two first-order systems: automorphic and resolving. We obtained a general solution of the automorphic system. This solution is an n-dimensional analogue of the Kolosov-Muskhelishvili formula. We found the main Lie group of transformations of the resolving system of this group foliation. It turned out that in the two-dimensional and three-dimensional cases, which have a physical meaning, this system is conformally invariant, while the Lame equations admit only a group of similarities of the Euclidean space. This is a big success, since in the method of group foliation, resolving equations usually inherit Lie symmetries subgroup of the full symmetry group that was not used for the foliation. In the three-dimensional case for the solutions of the resolving system, we found the general form of the transformations similar to the Kelvin transformation. These transformations are the consequence of the conformal invariance of the resolving system. In the three-dimensional case with a help of the complex dependent and independent variables, the resolving system is written as a simple complex system. This allowed us to find non-trivial exact solutions of the Lame equations, which direct for the Lame equations practically impossible to obtain. For this complex system, all the essentially distinct invariant solutions of the maximal rank we have found in explicit form, or we reduced the finding of those solutions to the solving of the classical one-dimensional equations of the mathematical physics: the heat equation, the telegraph equation, the Tricomi equation, the generalized Darboux equation, and other equations. For the resolving system, we obtained double wave of a special type and double waves of the shear deformations in an elastic medium. By the obtained formulas for generating new solutions, these solutions give an infinite set of exact solutions of this complex system. By the three-dimensional analog of the Kolosov-Muskhelishvili formula, the found solutions produce an infinite-dimensional vector space of exact solutions of the Lame equations.