The Gegenbauer polynomials are defined in Abramowitz & Stegun, Chapter 22, where they are known as Ultraspherical polynomials.
These functions evaluate the Gegenbauer polynomials \(C^{(\lambda)}_n(x)\) using explicit representations for \(n = 1, 2, 3\).
This function evaluates the Gegenbauer polynomial \(C^{(\lambda)}_n(x)\) for a specific value of \(n\), \(\lambda\), \(x\) subject to \(\lambda > -1/2\), \(n \geq 0\).