NEW YORK (AP) — A handwritten notebook by Alan Turing, the World War II code-breaking genius depicted by Benedict Cumberbatch in the Oscar-nominated *The Imitation Game*, is going on the auction block. The 56-page manuscript was written at the time the British mathematician and computer science pioneer was working to break the seemingly unbreakable Enigma codes used by the Germans throughout World War II.

It is being sold by Bonhams in New York on April 13. It is expected to bring at least $1 million.

The notebook contains Turing's complex mathematical and computer science notations. It is believed to be the only extensive Turing manuscript known to exist, the auctioneer said.

It dates from 1942, when Turing was trying to break the code with his team of cryptanalysts at Britain's World War II code and cypher school Bletchley Park.

In one entry Turing writes about a complex calculus notation: "The Leibniz notation 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 ..."

The notebook was among the papers he left in his will to friend and fellow mathematician Robin Gandy.

Gandy gave the papers to The Archive Centre at King's College in Cambridge in 1977. But he kept the notebook, using its blank pages for writing down his dreams at the request of his psychiatrist. Bonham describes Gandy's entries as highly personal; the notebook remained in his possession until he died in 1995.

At the beginning of his journal, Gandy writes: "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."

In a statement through Bonhams, Turing scholar Andrew Hodges said the notebook sheds more light on how Turing" remained committed to free-thinking work in pure mathematics."

*The Imitation Game*, which also stars Keira Knightley, is based on Hodges' book *Alan Turing: The Enigma*.

Turing committed suicide in 1954. He was gay at a time when homosexuality was illegal in Britain and was convicted of indecency in 1952. He agreed to undergo hormone treatment as an alternative to imprisonment to 'cure' his homosexuality.

Bonhams said the seller wished to remain anonymous. Part of the proceeds will be donated to charity.

*Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.*