Inequalities for ultraspherical polynomials and the gamma function