“I wonder,” she says, “how he manages to be both confusing and logical?”

There was, it would seem, some confusing logic in the zigzagging path of Mr. Smullyan’s life.

Raymond Merrill Smullyan was born in Far Rockaway, Queens, on May 25, 1919. His father, Isidore, was a businessman; his mother, the former Rosina Freeman, a homemaker.

His education was peripatetic and eclectic. He attended both Pacific University and Reed College in Oregon, then studied mathematics and logic on his own. He learned magic. He created chess puzzles that were more concerned about moves that had been made than the ones that should be made.

He put together a magic act, and performed under the stage name Five-Ace Merrill at nightclubs like the Pump Room in Chicago, where he worked for tips. He went on to get his bachelor’s degree in mathematics from the University of Chicago and a Ph.D. from Princeton. He taught at Princeton, Yeshiva, Lehman College of the City University of New York and Indiana University.

His philosophy of teaching was a little puzzling. “My policy is to teach the student as much as possible and to require from him or her as little as possible,” he told Donald Albers and Gerald Alexanderson, the authors of “Mathematical People: Profiles and Interviews” in 2008.

But, he added, the impact of his apparent lenience was that many of his students worked harder in his course than in any other.

Professor Smullyan is survived by his stepson, Jack Kotik; six step-grandchildren; and 16 step-great-grandchildren. His wife Blanche, a Belgian-born pianist and music educator, died in 2006. His first marriage ended in divorce.