NEWARK — In the month before officially becoming a presidential candidate, Senator Cory Booker spent his nights rewatching all 172 episodes of “Star Trek: Voyager.”

This is not a coincidence.

Gene Roddenberry, t he creator of “Star Trek,” was an idealist. His vision for the future, as conveyed in the franchise’s many iterations, was a progressive utopia where racism and poverty were mostly eradicated in favor of a thirst for learning.

From there, you can draw a straight line to Mr. Booker’s 2020 presidential campaign which he has tried to define in terms of relentless optimism and an upbeat appeal to healing the nation’s divisions. Mr. Booker, 50, has been obsessed with “Star Trek” since a young age. His father, Cary Booker, one of the first black executives at IBM, introduced him to the original series after it had already gone off the air.

At his home in Newark recently, Mr. Booker gleefully displayed some of his memorabilia, including a set of “Star Trek” PEZ dispensers and the “Star Trek Encyclopedia” from his bookcase. There is more in his Senate office. Take it from a Trekkie: That’s not casual fandom. Recently, Mr. Booker attended San Diego Comic-Con , and a picture of him beaming while flashing the Vulcan salute went viral. His girlfriend, the actress Rosario Dawson, also adores the franchise.