Specifically, how, based on the idea that energy will be shared equally among all degrees of freedom, does one come to the conclusion that each vibrational mode of a molecule will occupy $kT$ units of energy?
When learning statistical thermodynamics, classes often spend a lot of time talking about the Maxwell-Boltzmann distribution and even deriving that the expectation value for the energy of a monoatomic ideal gas is $\frac{3}{2}kT$ where $\frac12 kT$ comes from energy distributed to each cartesian coordinate plane.
Now, I find that I learn a whole lot from mathematical derivations of these types of things, and from simply working through the math and understanding its physical meaning.
So, I want to know, both on a conceptual level and through some sort of mathematical explanation, why does each vibrational mode of a molecule contribute $kT$ to the overall energy of the molecule when those modes are occupied?
My only guess is that one degree of freedom is kinetic energy (associated with the moving atoms) and the other is potential energy (analogy with a spring works here) but, if that is true, much clarity would be gained from a mathematical demonstration of this.