Physicist Janna Levin wrote a novel about Alan Turing and Kurt Gödel called A Madman Dreams of Turing Machines. She describes the parallels between the two mathematicians which inspired her to bring them together in fiction:
Alan Turing is most famous for breaking the German Enigma code during World War II. But among scientists, he’s best known for pure mathematical discoveries inspired by Kurt Gödel’s greatest work. Taken together their work proves that there are fundamental limits to what we can ever know. In the wake of this massive blow to knowledge, Turing invents the computer. So here they converge on some phenomenal truth about numbers but then diverge completely in their worldviews – Turing becomes an atheist who believes we are no more than soulless biological machines and Gödel believes in reincarnation of a soul. And then their suicides are bleakly complementary – Gödel starves himself to death in a paranoid delusion that his food is poisoned and Turing intentionally eats poisoned food, an apple, straight out of Snow White. I said you can’t make this stuff up.
And on the implied connection between brilliance and madness:
I’m glad for the opportunity to say outright that I don’t mean to imply a connection between brilliance and madness. Turing particularly was not insane. He was unusual and eccentric but not crazy. But I do think there is a painful and fascinating link between their brilliant attributes and their deep flaws. Gödel’s compulsive adherence to logic made his life almost unlivable. He couldn’t brush any detail aside and got trapped in these logical sequences that lead him to seemingly crazy beliefs. Turing too was a complete individual, committed to truth, so when the police came to his home to investigate a robbery, he didn’t think to hide his homosexuality. This was the 1950’s. After being tried and convicted of homosexuality and sentenced to hormonal castration, Turing’s suicide became an inevitable tragedy. Gödel and Turing are extreme versions of the human predicament. We are all great and ridiculous at the same time. What makes us great is often what makes us ridiculous.