We record a signal between times $t_0 < t < t_0 + T$. We sample our recording $N$ times in this time interval, with each reading taken time $\delta t$ apart (so $N\delta t = T$). The DFT tells us that
$$X_k = \Sigma^{N-1}_{n=0}x_n\exp\left(-\frac{i2\pi kn}{N}\right),$$ $$x_n = \Sigma^{N-1}_{k=0}X_k\exp\left(\frac{i2\pi kn}{N}\right),$$
where $x_n$ is the recording at time n$\delta t$ and $X_k$ is the Fourier coefficient of the $k^{th}$ frequency component.
From these equations it is evident that the $k^{th}$ angular frequency in the Fourier series is $2\pi k/N\delta t$, and the $k^{th}$ (non-angular) frequency is $k/N\delta t$.
This means that the maximum frequency is $\nu_{max} = (N-1)/N\delta t$.
According to the Nyquist-Shannon sampling theorem, the maximum frequency should be half of the sampling rate, so $\nu_{nyquist} = 1/2{\delta t}$.
But $1-1/N \geq 1/2$ as long as we have more than one measurement, therefore $\nu_{max}\geq\nu_{nyquist}$, which appears to violate the Nyquist-Shannon theorem. According to the theorem, there shouldn't be a term in the Fourier decomposition which corresponds to a frequency higher than the Nyquist frequency. How can this contradiction be reconciled?