# Tag Info

You have the state $$\frac{1}{\sqrt{r}}\sum_{s=0}^{r-1}e^{-2\pi i\frac{k}{r}(s+1)}|a^{s+1}\text{ mod }N\rangle.$$ Perform a change of variable $p=s+1$ so this simply reads $$\frac{1}{\sqrt{r}}\sum_{p=1}^{r}e^{-2\pi i\frac{k}{r}p}|a^p\text{ mod }N\rangle.$$ Now consider for a moment that $p=r$ term,  e^{-2\pi i\frac{k}{r}r}|a^r\text{ mod }N\rangle=|a^r\...