I'm trying to understand the fourier series coefficients for trig fourier series, and I came across the general expansion written in this form.
And their respective formulas, and I found an inconsistency in stuff online and what is taught by my professor. My prof gives the formula for a0 with the coefficient 2/T0 in the context for writing the series for a square wave, T0 being the fundamental frequency through a derivation with integration

However, I found another formula for the same term online, which consists of something really similar but slightly different.

Which one is correct (maybe both are correct?) and what is the significance of the 2/T0 or 1/T0 term in front? I am interpreting the 1/T0 as sort of an average value for across a period which kind of makes sense, but what about the 2/T0, why does that make sense? When should I be using each coefficient?
