In his years in office he turned the presidency—and the President’s House—into something it had not been before: a center of curiosity and inquiry, a vibrant institution that played informal but important roles in the broader life of the nation, from science to literature.