Orthogonal polynomials, special functions, and applications