A class of nonharmonic Fourier series