The Kustaanheimo-Stiefel transformation and certain special functions