# Tag Info

Since $0 \leq k_i < n$, as long as $i$ is not too large, we will have $0 \leq k_i + 2i+1 < 2n$. Therefore you can compute the modulo by checking whether $k_i+2i+1 \geq n$, and if so, subtracting $n$. This works as long as $(n-1) + (2i+1) < 2n$, that is, as long as $i < n/2$. Usually $n$ is very large, and so we are never going to perform $n/2$ ...