I can phase-shift the curve
$$\sum_{k=0}^R \cos\frac{k\pi x}{R}$$
by $+n$ by replacing $x$ with $(x-n)$:
$$\sum_{k=0}^R \cos\frac{k\pi (x-n)}{R}=\sum_{k=0}^R \cos(\frac{k\pi x}{R}-\frac{kn\pi}{R})$$
Somehow, individual instances of $\sum_{k=0}^R \cos(\frac{k\pi x}{R}-\frac{kn\pi}{R})$ sum to produce the desired phase-shift $n$. But I am puzzled about how this works.
Is there a formulaic way to explain it? Is there a way to split out some function of the $-\frac{kn\pi}{R}$ element so that it is separately summed?
Thanks in advance.