But back to Hardy. I suspect it was a lack of motivation rather than ability, but in his last years, he became quite dispirited and all but dropped mathematics. He died in 1947 at the age of 70.
Who Was Ramanujan?
Stephen Wolfram
69463
These days we are pressured for financial and social reasons to keep working until we are 70 and often past that to 80 and 90.