(a) State the sum of $1+w+w^2+\cdots+w^{n-1}$, for $w\ne1$. [1]
(b) Show that $$(1+i\tan\theta)^k=\sec^k\theta(\cos k\theta+i\sin k\theta),$$ where $\theta$ is not an integer multiple of $\frac\pi2$. [2]
(c) By considering $\sum_{k=0}^{n-1}(1+i\tan\theta)^k$, show that $$\sum_{k=0}^{n-1}\sec^k\theta\sin k\theta
=\cot\theta(1-\sec^n\theta\cos n\theta).$$ [5]
(d) Hence find $$\sum_{k=0}^{6m-1}2^k\sin\left(\frac{k\pi}{3}\right)$$ in terms of $m$. [2]