We present an O(N log2 N) algorithm for the computation of the first N coefficients in the expansion of an analytic function in ultraspherical polynomials. We first represent expansion coefficients as an infinite linear combination of derivatives and then as an integral transform with a hypergeometric kernel along the boundary of a Bernstein ellipse. Following a transformation of the kernel, we...