I think that the following might help:
The laser modes of a cavity of length $L$ have the following (angular) frequency spacing:
\begin{equation}
\Delta \omega = 2\pi c/(2L) = 2\pi/(T_c)
\end{equation}
Here, $T_c$ is the cavity roundtrip time. The standing modes of the cavity have the following frequencies:
\begin{equation}
\omega_n = \omega_{\text{offset}} + n\Delta\omega
\end{equation}
with $n = 0,1,2,3,...$, and $\omega_{\text{offset}}$ being the angular frequency of the carrier-envelope phase. The cavity modes propagate as follows:
\begin{equation}
E_n(z,t) = a_n \exp\left[ i(k_n z\pm\omega_nt + \phi_n)\right]
\end{equation}
where $a_n$ is the amplitude of the wave, $\phi_n$ its phase, and $\pm$ is used for waves propagating in both directions. A cavity will have $N$ longitudinal modes, and the circulating field within it can be expressed as a superposition of them:
\begin{equation}
E(z,t) = \sum_{n=q_0}^{q_0 + N-1} a_n \exp\left[i(k_nz - \omega_n t + \phi_n)\right]
\end{equation}
Now we can make some assumptions so that we can use the geometric progression formula that you give. Assume that the spectral profile of the laser is a 'top hat' function, so that all of the waves under the summation sign have the same amplitude $E_0$. We can also assume, for simplicity, that all of the waves have the same phase, so $\phi_n=0$ (there isn't too much loss of generality here either, as with a modelocked cavity the cavity modes have a well-defined phase relationship even when the phase isn't flat). Considering the wave at $z=0$ the equation for $E(z,t)$ becomes:
\begin{equation}
E(0,t) = E_0\sum_{n=q_0}^{q_0 + N-1} \exp\left[-i(\omega_{\text{offset}} + n\Delta\omega)t\right]
\end{equation}
Considering this as a geometric progression:
\begin{equation}
E(0,t) = E_0\exp(-i\bar{\omega}t)\frac{\sin[(N/2)\Delta\omega t]}{\sin[(1/2)\Delta\omega t]}.
\end{equation}
The bar notation indicates mean mode frequency of the oscillating modes. So, this superposition of modes yields a laser output which is a travelling wave with angular frequency $\bar{\omega}$, and which is modified by an envelope function given by $\sin[(N/2)\Delta\omega t] / \sin[(1/2)\Delta\omega t]$.
There are many sources for this as it is a standard approach to introducing the idea of modes and their phases in laser physics (so get to know it if you plan on studying more!). This is the reason why I've left out some intermediate steps in the maths. If this explanation doesn't suit you though, then there are quite a few (brilliant) sets of lecture notes online for this kind of thing, although admittedly it can take a lot of digging to get to the information that you need. Check out Rick Trebino's lecture notes. However, having said that I found that the following textbook was very useful (and I think this explanation, which is taken from my personal notes, is found here directly):
Laser Physics, Oxford Master Series in Atomic, Optical, and Laser Physics, (authors: Hooker & Webb).