Peter Swinnerton-Dyer, who has died aged 91, is famous among mathematicians as one author of the Birch-Swinnerton-Dyer conjecture in number theory. Published in 1965, this was immediately influential, becoming even more prominent in 1999 as one of the Clay Mathematics Institute’s seven million dollar Millennium Prize Problems, alongside the Riemann hypothesis.

Swinnerton-Dyer’s first published paper appeared in 1943, when he was 16 and still at school. His most recent publications, which are substantial, date from 2012-16, and he was pursuing major new research directions well into his final year. In between he served as master of St Catharine’s College, Cambridge, and vice-chancellor of Cambridge University, before moving to the civil service as chair of the University Grants Committee (UGC).

The B-SD conjecture was made on the basis of computer calculations, the first serious application of computers in pure mathematical research. However, the computing facilities available at the time were rudimentary; to the point that Swinnerton-Dyer himself wrote the first operating system for Titan, the successor at the Cambridge Computer Laboratory to the EDSAC2 on which he carried out the computations with Bryan Birch. He later described himself on occasions as a computer scientist masquerading as a pure mathematician.

The B-SD conjecture states that, given a cubic equation in two variables with integer coefficients, the number of rational solutions is governed in a precise way by the L-function of the elliptic curve it defines. (L-functions of elliptic curves also play a central role in Andrew Wiles’s proof of Fermat’s Last Theorem.) While the B-SD conjecture is a key problem in modern mathematics, and much is known about it, a complete proof remains elusive.

In view of modern applications of number theory to cryptography and internet security, workable solutions to problems around B-SD might be worth a great deal more than a million dollars to well-informed cybercriminals or their opponents.

Swinnerton-Dyer was born at Ponteland, Northumberland, the son of Sir Leopold Swinnerton-Dyer and his wife, Barbara (nee Brackenbury). The family moved to Shropshire early in Peter’s childhood. His father, as well as being a baronet and member of the landed gentry, was an engineer and successful businessman, and chair of several companies. He was also a well-known figure in British chess circles, but Peter was the first in his family to go to university. He read a lot and enjoyed doing sums; his mother supported his academic ambitions and his local school teacher recognised his mathematical aptitude.

He won a scholarship to Eton and in 1945 went to Trinity College, Cambridge. As a graduate student he studied under JE Littlewood, but never completed a PhD. However, in 1950 he became a fellow of Trinity, and remained there until 1973, with a crucial year’s visit to Chicago in the 1950s, where he worked with André Weil, an influence that set him on course to the famous conjecture and to much else besides.

Swinnerton-Dyer’s role at Trinity included a spell as dean, responsible for discipline. His sympathy with students and liking for their company (especially with cider, or evening board games) made him a less than feared figure (the family motto is *Terrere nolo timere nescio*, roughly “Unthreatening; undaunted”). In 1973, at the relatively young age of 46, he was elected master of St Catharine’s. He remained there for 10 years, frequently preferring student company to that of the fellows. During this time the character of the college was enriched by the admission of women.

The year 1983 brought abrupt change: he resigned from St Catharine’s, took up the UGC chair, and married the archaeologist Harriet Crawford. This was a turbulent time in university finances: Swinnerton-Dyer worked closely with the education secretary Sir Keith Joseph.

Though himself an SDP member, he respected both Margaret Thatcher and Joseph and was influential in informing them of the importance of research quality in judging universities. While by no means perfect, the research assessment system then introduced contributed to the competitiveness of UK universities in the world. He left the Universities Funding Council (successor to the UGC) in 1991.

Swinnerton-Dyer was elected a fellow of the Royal Society in 1967, succeeded his father as 16th baronet in 1975 and was knighted in 1987. He won the Sylvester medal of the Royal Society and the 2006 Pólya prize of the London Mathematical Society, and was awarded honorary degrees at Bath and Warwick universities.

Even as head of the UGC-UFC, he had never ceased to do mathematics, and published several major papers during the 80s. His mathematical work was remarkable for its originality, freely mixing ideas from different areas to attain unexpected insights. He was fearless in his choice of problems. From the 90s, he pursued work on 2-descent (a method going back to Fermat) as a way to study rational points on varieties fibred in elliptic curves; the aim being practical calculations to determine for interesting classes of algebraic surfaces (and so on) whether rational points exist, and if so, how many.

This sometimes involved highbrow modern theory, but not as a first preference. The quest for a beautiful theory never ruled out cobbling together a messy or convoluted solution that actually worked. Despite the seemingly modest viewpoint, Swinnerton-Dyer obtained very significant results, several in areas previously considered intractable. One of his papers was conceived while on a tour of eastern Anatolia with Harriet: latterly he often accompanied her to archaeological meetings.

Stories about Swinnerton-Dyer abound. In addition to his love of student company and board games, he was more than competent at squash, tennis and real tennis. He played chess well and bridge to international standard: he was part of the British team that came second in the 1953 European championship.

In a tournament, Swinnerton-Dyer once scuttled his opponents’ grand slam by bidding eight clubs; the rules at the time invalidated an impossible bid made by mistake or oversight, so he first telephoned the tournament director to make clear his bid was intentional. The rules of bridge were subsequently revised to prevent this.

Swinnerton-Dyer was an inspirational if idiosyncratic teacher. His genial personality, exceptional erudition and generous support for students and younger colleagues won him many lasting friends.

His wife survives him.

• Henry Peter Francis Swinnerton-Dyer, mathematician, university administrator and civil servant, born 2 August 1927; died 26 December 2018