Implemented offset sinsquared sums