With regard to "interplay between mathematics and philosophy", there is an important text by Nowak:
Nowak, Gregory. Riemann's Habilitationsvortrag and the synthetic apriori status of geometry.The history of modern mathematics, Vol. I(Poughkeepsie, NY, 1989), 17-46. Academic Press, Inc., Boston, MA,1989
Philosopher Johann Friedrich Herbart was a significant influence on the greatBernhard Riemann. Nowak goes on to make the following three points.
Herbart's constructive approach to space mirroredthe content of Riemann's reference to Gauss in that both discussedconstruction of spaces rather than construction in space.
Riemann followed Herbart in rejecting Kant's view of space as an apriori category of thought, instead seeing space as a concept whichpossessed properties and was capable of change and variation. Riemanncopied some passages from Herbart on this subject, and the Fragmentephilosophischen Inhalts included in his published works contain apassage in which Riemann cites Herbart as demonstrating the falsity ofKant's view.
Riemann took from Herbart the view that the construction of spatialobjects was possible in intuition and independent of our perceptionsin physical space. Riemann extended this idea to allow for thepossibility that these spaces would not obey the axioms of Euclideangeometry. We know from Riemann's notes on Herbart that he readHerbart's Psychologie als Wissenschaft.
Thus, Herbart's philosophy helped Riemann escape from the rut ofKant's "absolute space", at a time when a vast majority of Riemann'scontemporaries were still under its spell. Who knows whether Riemannwould have been able to establish what is known today as Riemanniangeometry without the liberating influence of Herbart's philosophy.
Another example I would mention is Hilbert. Around 1900, mathematicswas still dominated by analysts in Berlin, and those analyststhought that mathematics = analysis, and that people like Sophus Lie and FelixKlein were charlatans (they said so explicitly). It is well knownthat Hilbert's list of 20 problems helped shape the course of 20thcentury mathematics. What is significant about Hilbert's list isthat few of the problems are actually in analysis. In his speech atthe Paris congress, Hilbert outlined a liberating philosophy that tookmathematics out of the rut of Berlin's focus on analysis.