freq is 1/i, where i is zero indexed