I have read in many places that as the gas of photons has a chemical potential $\mu=0$ it can't reach a Bose-Einstein condensate (BEC), but I don't understand why.
I am reading Greiner's "Thermodynamics and Statistical Mechanics" and in chapter 13 "The Ideal Bose Gas", he first derives the Bose-Einstein conditions for an ideal Bose gas and then, as a particular example, he derives some relations for the gas of photons. I think I understand the case for the ideal gas, but when I try to apply that same approach to the gas of photons, I can't seem to reach the conclusion that the BEC is not possible.
So, a quick summary of how I understand that an ideal Bose gas condensates:
Ideal bose gas
The mean occupation number is given by:
$$ N = \sum_k \frac 1 {e^{(E_k-\mu)/kT}-1} \tag{1} $$
And, to compute this summation, we can approximate it as an integral which results in:
$$ N_E = \frac V {\lambda^3} g_{3/2}(z) \tag{1.1}$$
where the $z=e^{\mu/kT}$ is called the fugacity
and:
$$
g_n(z) = \frac 1 {\Gamma(n)} \int_0^\infty \frac {x^{n-1}dx} {z^{-1}e^x-1} \tag{1.2}
$$
The reason why I am labeling this as $N_E$ is because the approximation leaves out the case for the ground state (when $E_k=0$), so the mean occupation number is in reality:
$$ N = N_e + N_0 \tag{1.3}$$
where
$$
N_0 = \frac z {1-z} \tag{2}
$$
which is just $(1)$ evaluated for $E_k=0$.
We can see from here that $N_0$ diverges when $z=1$ (which is when $\mu=0$), for which $N_E$ has a finite value (as all $g_n(1)$ are finite for $n>1$). This means that, in this scenario, almost all particles are in the ground state which results in the Bose-Einstein condensate.
Now, for the gas of photons (using Greiner's equations):
Gas of photons
Equation $(1)$ still holds if we set $\mu=0$, which must mean that equation $(2)$ also holds, so (considering de density of states $g(E)$ as @SuperCiocia noticed were missing and adding more details): $$ N_0 = \lim_{\mu \to 0} \frac {e^{-\mu/kT}} {1 - e^{-\mu/kT}} \to \infty \tag{3} $$ And approximating $N$ as an integral, we get: $$ N_E = \int \langle n_E \rangle g(E)dE = \frac {8\pi V} {h^3 c^3} \int_0^\infty \frac {E^{2}dE} {e^{E/kT}-1} = \frac {8\pi V k^3 T^3} {h^3 c^3} g_3(1) \tag{4} $$ which is finite. Then this must mean that the gas of photons is always in the Bose-Einstein condensate phase, which clearly doesn't make any sense.
Can someone tell me, what am I doing wrong?
I have checked some questions about this (like what-is-condensed-light, can-a-system-entirely-of-photons-be-a-bose-einsten-condensate) and the explanations given are more of physical intuition about photons popping out of existence (as $\mu=0$) which implies there is never a saturation of states (either ground state or any excited state), but I can't seem to relate these equations to that argument. The closest I have found is why-zero-chemical-potential-does-not-allow-the-bose-einstein-condensation-of-phonons which performs a similar analysis, except that instead of getting $N_0$ from $(1)$ (as I did here and as Greiner does), he calculates the limit of $N_E$ when $E \to 0$ which yields a correct result, but then I don't get why Greiner doesn't do it that way.