Alan Turing, Courtesy of Bonhams Alan Turing. (Courtesy of Bonhams)

When the code-breaking genius Alan Turing died, he left much of his life’s work to Robin Gandy, another mathematician and close friend. Most of those papers now live at the archives in King’s College in Cambridge. But Gandy kept something special for himself: A notebook of Turing’s hand-written thoughts, from the period during which he was trying to break the famed Enigma Code.

That notebook is now coming up for auction, and Bonhams expects it to fetch more than $1 million.

The auction — scheduled for April 13 in New York — comes months after the release of “The Imitation Game,” a biopic of Turing that revived interest in his life among the general public. Turing was gay, a criminal offense in England at the time, and he was forced to undergo hormonal therapy to “cure” him of his sexual orientation after a 1952 conviction. He committed suicide two years later.

Bonham’s press release announcing the auction plays up the “Imitation Game” tie-in and even contains a quote from the film’s star, Benedict Cumberbatch, about how “the thought of being able to hold a manuscript that was written by him is thrilling.”

Cumberbatch received a best actor Oscar nomination for his portrayal of Turing, one of eight nominations for “The Imitation Game,” which itself is up for best picture.

Cassandra Hatton, a senior specialist in the fine books and manuscripts department at Bonhams, wrote in an email that it’s “hard to say” whether increased attention from the film would boost the expected price for the notebook.

“Turing items, especially in recent years fetch strong prices at auction,” Hatton noted, adding: “Items relating to other major scientists such as Crick or Watson have seen 7-figure prices at auction.”

The story of the auction-bound notebook contains quite a bit of intrigue on its own.

Gandy died in 1995, and the notebook stayed in his possession, kept private until his death. A cursory glance at the notebook shows why: The mathematician used the blank spaces in Turing’s notebook to write down the content of his own dreams.

The book then became something else — simultaneously a priceless look into the mind of Turing’s work during a critical period of his career, and a deeply personal journal containing Gandy’s waking reflections on his own dreams. “The manuscript has not been seen before because it was in Robin Gandy’s possession until he died,” Bonhams spokeswoman Vyoma Venkataraman said in an e-mail. Gandy, she added, “wanted to keep the details of its contents private. ”

An excerpt from Turing’s journal: “The Leibniz notation dx/dy I find extremely difficult to understand in spite of it having been the one I understood the best once! It certainly implies that some relation between x and y has been laid down eg, y=x2+3x…” (Courtesy of Bonhams)

“It seems a suitable disguise to write in between these notes of Alan’s on notation, but possibly a little sinister; a dead father figure, some of whose thoughts I most completely inherited,” Gandy wrote at the beginning of his own entries into the journal, according to Bonhams.

Had it been donated to the King’s College archives along with the rest of Turing’s papers, the book would have certainly been of great value to scholars. “It is almost certainly the only extensive autograph manuscript by Turing in existence,” Bonhams says of the notebook, adding that the 50-something page journal “dates from 1942 when he was working at Bletchley Park to break the German Enigma Code, and provides remarkable insight into the thought process of a genius.”

In its news release, the auction house quoted Turing scholar Andrew Hodges, who said: “Alan Turing was parsimonious with his words and everything from his pen has special value. This notebook shines extra light on how, even when he was enmeshed in great world events, he remained committed to free-thinking work in pure mathematics.” (“The Imitation Game” is based on a book about Turing by Hodges.)

According to the Associated Press, the current seller of the notebook will remain anonymous. The auction house told the AP that a portion of the sales would go to charity; we’ve asked Bonhams for more information on those plans.

RELATED: ‘The Imitation Game’s’ lesson for society

Alan Turing’s Google Doodle: Decoding the depth of his genius — by the numbers

Ann Hornaday: Benedict Cumberbatch passes the test as Alan Turing