I'm beginning to study the Matt Roots book Introduction to Cosmology and in the section 1.3 Olbers' Paradox he writes:
"If the surface area of an average star is A, then its brightness is B=L/A. The sun may be taken to be such an average star, mainly because we know it so well.
The number of stars in a spherical shell of radius r and thickness dr is then ##4\pi r²ndr##. Their total radiation as observed at the origin of a static universe of infinite extent is then found by integrating the spherical shells from 0 to ##\infty##:"
$$\int_{0}^\infty 4\pi r^2nBdr = \int_{0}^\infty nLdr = \infty$$
______________________________________________

I suppose that he use ##B=\frac{L}{4\pi r^2} ## for obtain the second integral, but r is the radius of the shell not the average radius of the stars. I'm a little bit confused whit that.

Of course if the Universe is infinite and the integration runs from 0 to infinity the total luminosity must be infinity.

My doubt is about the use of r above, in the radius of shell and also the same letter for the radius of a star... and then vanishing... I'm a little bit confused.