Summation limits in DFT
If $N$ is the DFT length, the summation is always over $N$ points. So under this assumption, the first formula doesn't make any sense. Note that the term $e^{-j2\pi nk/N}$ is $N$-periodic in $k$ and $n$, so summing over one period always gives the same value, regardless of the starting index. With the additional assumption that $x[n]$ is periodically continued, i.e., $x[n]=x[n+N]$, you can compute the given sum over any interval of length $N$. A notation emphasizing this fact is
$$X[k]=\sum_{&lt;N&gt;}x[n]e^{-j2\pi nk/N}\tag{1}$$