Consider a sequence of n operations on a data structure in which the cost ci of the ith operation is defined as ci = i2 if i is a power of 2 and ci = 1 otherwise.
Use aggregate analysis to get an upper bound on the cost of the n operations.