Interplay between mathematics and physics to catch the nature of a scientific breakthrough : the case of the blackbody