Fourier representation method for electronic structures of linear polymers