1. Indian advances in Mathematics are several centuries in the future from the period under discussion. And they owe quite a bit to interaction with the Greeks though patriots might not want to admit it.
2. Pali wasn’t a “language of masses” either. It was a trade language of Western India that became the literary language of the sthaviravadi Buddhists. Other sects used Sanskrit or other Prakrits. Shakyamunis mother tongue was Magadhi yet another Prakrit.
3. Sanskrit was the most prestigious language though at this point it didn’t have the monopoly it would later have. No it wasn’t a mass language either but more people had access to it than you might think.