Tom Lehrer, the Harvard-trained mathematician whose wickedly iconoclastic songs made him a favorite satirist in the 1950s and ‘60s on college campuses and in all the Greenwich Villages of the country, died on August 9 at his home in Cambridge, MA. He was 97.

Mr. Lehrer’s lyrics were clever, sometimes salacious, and almost always satirical. Accompanying himself on the piano, he performed in nightclubs, in concert, and on records that his admirers purchased originally by mail order, in the hundreds of thousands. In 1953 encouraged by friends, he produced an album. To his surprise, “Songs by Tom Lehrer,” cut and pressed in an initial run of 400 copies, was a hit. Sold through the mail and initially promoted almost entirely by word of mouth, it ultimately sold an estimated half-million copies.

His music, though, was just a detour in an academic career that included teaching posts at Harvard, the Massachusetts Institute of Technology, and the University of California, and even a stint with the Atomic Energy Commission.

Reflecting on his bicoastal life in a 1981 interview for Newsday, he said he planned to keep his Massachusetts home “until my brain turns completely to Jell-O, at which time I will, of course, move to California full time.”