The proof is rather simple if you consider the counter example and I will leave it to the OP to work out the details with these hints that are hopefully helpful.
Understanding the premise of the Fourier Series Expansion is a good starting point: Any single valued analytic function from $0$ to $T$ in time can be decomposed into an infinite series of sinusoids each with a frequency of $n/T$ where $n$ is any integer. Here is the key point:
The result of summing all those components will result in a waveform that matches the original function as expected from $0$ to $T$, but also since each of those components repeat themselves over that interval, then the original function will also repeat over every additional interval of $T$ in time! Consider that any other frequency other than these provided will not repeat as such, then they would disrupt the resulting repetition so therefore cannot exist.
When the beginning of a waveform is not continuous with the end of the waveform, a discontinuity results in the repeated pattern, leading to ringing at the edges in the Fourier reconstruction known as the Gibbs effect. This is consistent with the fundamental requirement that the waveform needs to be single valued and analytic function.