periodic sums