DFT: Basis functions and Significance of dividing frequency by Sample length A time domain signal can be decomposed into sinusoids which are based on basis functions.

For a N sampled input, a cosine basis function is defined as:

$$C_k[i] = \cos\left[\dfrac{2\pi k i}{N}\right]$$

Range of Frequency $k = 0 \ldots \frac{N}{2}$, Range of $i = 0 \ldots N-1$

Why is the sinusoid angle divided by $N$?
This normalises the frequency such that the period of the first cosine is N samples. Then all subsequent cosines are N/2 samples, N/3 samples.... all the way to N/(N/2) = 2 samples, at the Nyqust limit where k = N/2. If you want the full DFT, including negative frequencies, k should range from 0 to N-1.