g(m)=1kn=1kf(n)-2πmn/k.