Observation: xn={x(x2)(n−1)/2,(x2)n/2,\mboxifn\mboxisodd\mboxifn\mboxiseven Thus we can achieve O(logn) multiplications.