Fourier series of orthogonal polynomials