From the Indian mathematician Bhāskara II to the Italian inventor Da Vinci, this enigma confounded intellectuals for seven centuries. In a casual museum visit to Florence, he also understood a lesser fascinating enigma