Conservation of the spectral moments in the n-pole approximation