Spectrum generating algebras in Kaluza-Klein theories