Cassandra Hatton, senior specialist in fine books and manuscripts and the history of science at Bonhams, said Turing's notes were the precursor to much of the work he later did on computers. "He is working on logic and the foundations of mathematics with the aim of creating a universal language for a universal computing machine," she said.
The notebook will be sold on behalf of an anonymous vendor in New York on April 13 at the Bonhams fine books and manuscripts sale.
"Alan Turing was parsimonious with words and everything from his pen has special value," said Andrew Hodges, author of Alan Turing: The Enigma. "This notebook shines light on how, even when he was enmeshed in great world events, he remained committed to freethinking work on pure mathematics."
More from the Financial Times:
Turing granted posthumous pardon by Queen
Turing case cracks the apology code
Judge backs Sotheby's in Caravaggio case
Ms Hatton called the notebook, bought from a stationers in Cambridge, "probably the most extensive manuscript that exists in Turing's hand". She added: "To be able to look in and see his thought processes is extremely important — you see the types of things in mathematics that really bothered him, what he thought needed to be worked on."
In 1952 Turing was convicted of gross indecency for engaging in homosexual acts, which was a criminal offence until 1967. As a result he lost his security clearance and had to stop his code-breaking work.
He committed suicide in 1954 as a consequence of the hormone treatment — chemical castration — he took to "cure" his homosexuality, to which he had agreed as an alternative to jail. Turing was not pardoned until 2013.
Read More'Nobel Prize' of computing gets $1M from Google
Turing and Gandy met during the war and later worked together at Cambridge, becoming close friends and colleagues. "Turing's death was devastating to Gandy," said Ms Hatton. "Gandy took up his intellectual mantle and also edited Turing's complete papers."
But this friendship gave rise to another intriguing aspect of the notebook. Between the mathematical notes at the front and back, Gandy wrote his own "dream journal" at the request of his psychiatrist, as well as highly personal entries relating to his sexuality (like Turing, Gandy was homosexual) and about Turing himself.
"It seems a suitable disguise to write in between these notes of Alan's," Gandy wrote at the beginning of his journal, "but possibly a little sinister; a dead father figure, some of whose thoughts I most completely inherited."
This highly personal element to the notebook explains why Gandy never handed it over. Until now, it has never been seen in public.
Ms Hatton said: "Any time you get something by a significant scientist that has never been seen, it is important for general scholarship — and anything with even a tiny touch of Turing on it is highly valued."