I am trying to find the original reference which introduced the definition of discrete Fourier transform as used today. When did this modern formulation (which includes the indexing from n to N-1) of DFT appear in the literature?
$$ \begin{aligned} X_{k} &=\sum_{n=0}^{N-1} x_{n} \ e^{-\frac{i 2 \pi}{N} k n} \\ &=\sum_{n=0}^{N-1} x_{n} \left[\cos \left(\frac{2 \pi}{N} k n\right)-i \ \sin \left(\frac{2 \pi}{N} k n\right)\right] \end{aligned} $$
Fourier original on Analytical Theory of Heat does not deal with discrete versions. History related articles credit Gauss well before Fourier. For example here, Gauss and the History of the Fast Fourier Transform, Archive for History of Exact Sciences , 1985, Vol. 34, No. 3 (1985), pp. 265-277 ([Link])1, shows a table, but the article just defines the DFT in "modern notation" for Gauss's Latin work and credits Gauss rather.