He was born in Peppard, Oxfordshire, where his father, Thomas Gandy, was in general practice. His mother, Ida Gandy, earned a reputation for a sequence of books based on her early life in Wiltshire. Educated at Abbotsholme, a progressive public school, he went on to join that special elite at King's College, Cambridge. In 1940, his graduation year, he met Alan Turing, famed now for breaking the German Enigma code, and in 1944 they started working together at Hanslope Park, in Buckinghamshire, by which time Gandy had become an expert on military radio and radar.
His friendship with Turing continued. In 1946 he returned to King's to take Part III of the Mathematical Tripos with distinction, then began studying for a PhD under Turing's supervision; his successful thesis on the logical foundation of physics, entitled "On Axiomatic Systems in Mathematics and Theories in Physics" and presented in 1953, can now be seen as a bridge between his early expertise and later career. When Turing died in 1954 he left his mathematical books and papers to Gandy, who between 1950 and 1961 held lectureships in Applied Mathematics at first Leicester, then Leeds. During this period his commitment to logic evolved and he developed a Mathematics-Philosophy course at Leeds, with Martin Lob.
In 1961, Gandy moved to Manchester, where the seemingly retiring but extremely astute Max Newman had with (now Sir) James Lighthill built up what was then the best mathematics department in the country. Newman had brought Turing to Manchester, and he selected Gandy to develop logic and start up a Mathematics-Philosophy course.
Now officially a logician, Gandy appointed new staff and invited many visitors from abroad. He was promoted to a chair in 1967, and organised the European summer meeting of the Association for Symbolic Logic in Manchester in 1969, supported as was usual then by Nato funds. Turing had gently chided Gandy in 1940 for his left-wing beliefs; now, ironically, be came to be attacked as right-wing for his support of Nato funding. These were halcyon days for mathematical logic, with unexpected connections being made between the principal areas of research. Gandy's own research into functionals of higher types had made him prominent, quite aside from his high motivating qualities.
In 1969 he gave up his chair in Manchester for a readership in Mathematical Logic at Oxford, where he was to be based for the rest of his life. He was adopted by the young Wolfson College and soon had rooms in the college's fine new building in north Oxford. He occasionally complained about the "tedious beat of heavy metal" from some other room but generally found college life very congenial.
He was responsible for the Mathematics - Philosophy course, and with John Sheperdson from Bristol brought the British Logic Colloquium into being. Dana Scott was appointed to a new chair of Mathematical Logic in 1972, Michael Dummett succeeded Sir Alfred Ayer to the Wykeham chair of logic in 1979 and Ronald Jensen came to All Souls in 1981. Mathematical logic came into its own in Oxford and Gandy's list of PhD students grew from three to around 30.
He retired in 1986 amongst fireworks and full moon at the University of Wales's retreat at Gregynog in Powys, feted at a conference in his honour by an international gathering and most of his PhD students. He continued to publish with great vigour, and was a familiar figure at international conferences until shortly before his death.
He had seemed more fragile recently, but in earlier years he loved walking the Snowdonian hills, especially his beloved Cnicht, or, based at his cottage on the Portmeirion estate, combing the forests for fungi: one favourite memory is of him perched on top of a wall in his jodhpurs, pipe in hand and turning his craggy face to a red-faced farmer to say, "There is nothing to worry about. I'm used to climbing your walls."
He made a number of appearances on radio and television, especially to reminisce about Alan Turing. When asked about Turing's motives if he really did commit suicide, Gandy would become quite heated: "Some things are too deep and private and should not be pried into." Himself, he was much loved and his generosity, tolerance, hospitality, kindliness, good-humour, irreverence, erudition and mouth-watering home-made ice-cream will be sorely missed. He would often chide himself as a "silly old owl", but then the owl is by repute the wisest of birds.
Robin Oliver Gandy, mathematical logician: born Peppard, Oxfordshire 22 September 1919; Lecturer in Applied Mathematics, Leicester University 1950-56; Lecturer in Applied Mathematics, Leeds University 1956-61; Senior Lecturer in Mathematical Logic, Manchester University 1961-64, Reader 1964-67, Professor 1967-69; Reader in Mathematical Logic, Oxford University 1969-86; died Oxford 20 November 1995.