David X. Cohen is one of the few TV writers who can thank a physics degree for his big break. As the resident science nerd on The Simpsons back in the late 1990s, he was tapped by series creator Matt Groening to help develop a new sci-fi show for Fox. The series they dreamed up, Futurama, was bursting at the seams with wild sci-fi antics and macabre humor. The network was perplexed.

“I think they thought it was going to be a little bit more of a family flying around on a sofa in space,” Cohen says in Episode 118 of the Geek’s Guide to the Galaxy podcast.

Fox reluctantly gave Cohen and Groening the go-ahead for their new show, and though Futurama quickly earned a loyal following among sci-fi fans, it never achieved the broad mainstream popularity of The Simpsons. But one thing the shows do share is their large number of sly math jokes, many of which are catalogued in the new book The Simpsons and Their Mathematical Secrets by Simon Singh. The book includes four chapters on Cohen and Futurama.

“We’ve entered a surreal chapter in the history of these shows were I’m doing interviews about math suddenly that I haven’t thought about in 20 years,” says Cohen. “So don’t quiz me.”

He’s also busy contemplating his next project, following the fourth and possibly final cancellation of Futurama last year. Fans can look forward to a Simpsons crossover in November, but beyond that the show’s future is uncertain. Cohen believes that DVD sales will likely determine whether Futurama returns again, but also feels that fans have already done their part to keep the showing going for as long as they have.

“Our fans have helped us more than the fans of almost any other show,” he says. “Our fans don’t owe us anything. In fact, I feel like I owe all of our fans a free DVD set.”

For more on David X. Cohen and Futurama, listen to our complete interview in Episode 118 of the Geek’s Guide to the Galaxy podcast (above) and check out a few highlights from the discussion below.

David X. Cohen on the influence of Stanislaw Lem:

“My mom was a voracious science fiction reader, so actually that’s where I got my love of science fiction, and some of the books I found lying around when I was a kid were the Stanislaw Lem books like The Star Diaries, The Tales of Pirx the Pilot, and [Mortal Engines]. These are these really strange, surreal, and funny sci-fi short stories that I think did have a big influence on me, especially as far as the idea that robots could be characters. So Bender being kind of the most human character on Futurama I think does owe a little bit to Stanislaw Lem. I particularly remember this one story that had a huge influence on me … about a planet that was inhabited entirely by robots, and these humans crash-land on it, and the murderous robots are out to kill the humans, and the humans have to pretend to be robots to survive, and of course it turns out ultimately—spoiler alert here—it turns out that everybody on the planet are humans who crash-landed and are disguising themselves as robots, and are hiding out in desperation from each other. So that directly influenced Futurama.”

David X. Cohen on Richard Nixon:

“For those listening who don’t watch Futurama, Richard Nixon’s head—which is preserved in a jar of liquid, as many famous people’s heads are in the future—Richard Nixon’s head is president of the world in the future. … I remember Matt Groening saying, ‘If you had told me in the ’70s that I was going to be able to make fun of Richard Nixon 30 years later, I would have been so happy.’ It was just his longtime dream to continue kicking around Richard Nixon. … And early on in the show the network got a letter from the Richard Nixon Library saying they weren’t pleased with his portrayal and would we consider not doing it. … We didn’t really stop, however, because we liked it, but the strange thing is that … a few years later we got another letter from the Nixon Library saying can we provide some materials because they’re going to do an exhibit about Nixon in popular culture and they’d like to include Futurama, so they came around.”

David X. Cohen on the Futurama Theorem:

“The highlight of Futurama math for sure is this thing that’s now known as the ‘Futurama Theorem.’ I’m descending into hyper-nerdspace now. The writer of this episode was Ken Keeler, who I mentioned earlier, who has a PhD in applied math. … And he was writing this episode where the idea was the characters are all going to switch brains, with this brain-switching machine—sort of a standard sci-fi and cartoon idea. … And we came up with this complication: If the machine switches two people’s brains, it cannot switch those same two people’s brains back. … And we were just trying to make the plot more complicated, but we realized that we had accidentally created this math problem. … Ken comes in the next morning with a stack of paper and he said, ‘I’ve got the proof,’ and he had proven that no matter how mixed up people’s brains are, if you bring in two new people who have not had their brains switched, then everybody can always get their original brain back, including those two new people. So I was very excited about this, because you rarely get to see science, let alone math, be the hero of a comedy episode of TV.”

David X. Cohen on “The Un-Freeze of a Lifetime”:

“These Anthology of Interest episodes are ones where we do three mini-stories rather than one big story. This is sort of the format of the Simpsons Halloween episodes. So on Futurama we have these Anthology of Interests where we say, ‘What if blank?’ and it’s some alternate version of the future that we don’t normally show. We did one, which I wrote, where Fry asks, ‘What if I had never come to the future?’ And we see that because he was supposed to go into the future and the future changed, there’s an instability in the spacetime continuum, and the universe is going to collapse, and we then show Al Gore leading this team of super-nerds that must save the universe. The team consisted of him, Gary Gygax (the creator of Dungeons & Dragons), Nichelle Nichols from the original Star Trek, Deep Blue the chess-playing computer, and … did I forget anyone? Stephen Hawking, of course. Stephen Hawking, who also appeared three times on Futurama. So it was a nerd’s delight to work on this episode.”