In 1979, Freeman Dyson came up with a plan to live forever.

There was no fanciful elixir. It was not a matter of theological speculation. Mr. Dyson was, for all his eccentric, maverick tendencies, a theoretical physicist — one of the most brilliant and insightful of his age.

In a mathematically rigorous manuscript, sprinkled with commentary and philosophical quotations, he wrote the formulas by which some advanced consciousness could encode itself into a form of matter that would persist indefinitely into the cosmic future, after the last star is snuffed out in the darkness.

He postulated that this eternal machine might be an amorphous cloud of particles, passing electromagnetic signals back and forth to emulate human thought. He made sure to spend a few paragraphs outlining a detailed plan for unlimited memory storage, since “it seems hardly worthwhile to be immortal if one must ultimately erase all trace of one’s origins in order to make room for new experience.”

It was this paper, “Time Without End: Physics and Biology in an Open Universe,” that brought me to Mr. Dyson’s office at the Institute for Advanced Study in Princeton last May, four decades after its publication. I was working on a book about the end of the universe and seeking his expertise. How will it happen? How can we know? Should we hold on to anything like hope?