There are many Slowly Pulsating B (SPB) stars and γ Dor stars in the Kepler Mission data set. The light curves of these pulsating stars have been classified phenomenologically into stars with symmetric light curves and with asymmetric light curves. In the same effective temperature ranges as the γ Dor and SPB stars, there are variable stars with downward light curves that have been conjectured to be caused by spots. Among these phenomenological classes of stars, some show 'frequency groups' in their amplitude spectra that have not previously been understood. While it has been recognised that nonlinear pulsation gives rise to combination frequencies in a Fourier description of the light curves of these stars, such combination frequencies have been considered to be a only a minor constituent of the amplitude spectra. In this paper we unify the Fourier description of the light curves of these groups of stars, showing that many of them can be understood in terms of only a few base frequencies, which we attribute to g mode pulsations, and combination frequencies, where sometimes a very large number of combination frequencies dominate the amplitude spectra. The frequency groups seen in these stars are thus tremendously simplified. We show observationally that the combination frequencies can have amplitudes greater than the base frequency amplitudes, and we show theoretically how this arises. Thus for some γ Dor and SPB stars combination frequencies can have the highest observed amplitudes. Among the B stars are pulsating Be stars that show emission lines in their spectra from occasional ejection of material into a circumstellar disk. Our analysis gives strong support to the understanding of these pulsating Be stars as rapidly rotating SPB stars, explained entirely by g mode pulsations.