For a positive integern, indices with the same quotient q=⌊n/i⌋ form intervals. If an interval begins at l, it ends at r=⌊n/q⌋. There are O(n) distinct quotients: either i≤n, or the quotient is below n. This permits summing constant-quotient blocks instead of visiting every index.