Also another question. You said: "The FFT of 101 data points is doing the FFT of the periodic time series
1, [99 points defining the cosine wave], 1, 1, [99 points repeated], 1, 1, etc"
But doesn't taking a larger point FFT mean padding the input with trailing zeros? Your input seems padded...