G.H Hardy (1877-1947), the well-known mathematician and mentor of Ramanujan, wrote in 1940 a rather short but remarkable essay on the aesthetics of mathematics (*“A Mathematician’s Apology”*). In this essay Hardy wanted to defend the beauty of pure mathematics despite its apparent lack of usefulness. Compared to applied mathematics which uses quantitative methods as an instrument for other ends like engineering or accounting, pure mathematics deals with the most intricate and abstract mathematical structures. Pure mathematics rarely has any practical use, but it is defended by many mathematicians because of its elegance and profundity. One of the branches of pure mathematics like number theory deals with the patterns of integers. Despite their lack of use for the real world, problems in number theory have fascinated mathematicians since the times of Ancient Greece (think of the effect on the Pythagoreans when was discovered to be irrational!). Fermat’s Last Theorem (conjectured in 1637), before being solved in 1994, was probably the most famous problem not just in number theory, but in mathematics in general.

According to Hardy *“The ‘real’ mathematics of the ‘real’ mathematicians, the mathematics of Fermat and Euler and Gauss and Abel and Riemann, is almost wholly ‘useless’ (and this is as true of ‘applied’ as of ‘pure’ mathematics). It is not possible to justify the life of any genuine professional mathematician on the ground of the ‘utility’ of his work”*

Indeed, it is rather difficult to find any use for Hardy’s own mathematics. Think of the Hardy-Littlewood conjectures: these are formulas on prime numbers that, despite their ‘cold and austere’ beauty (to paraphrase Russell) have no use for the worldly necessities unlike calculus which can be applied in engineering and physics.

However WWII showed that Hardy was mistaken when he claimed that the ‘real’ mathematics, as he called it, is useless. Indeed, WWII forced the Allies to undertake deep research into cryptography in order to decipher the Nazi’s Enigma machine. It is now a well-established historical fact that one of the fundamental determinants of the Allied victory was the ability to to decrypt and read the Axis’ military intelligence. The most famous cryptologist of all was obviously Alan Turing (1912-1954), who worked for the British GC&CS (today known as GCHQ) at the Bletchley Park codebreaking centre to break the Axis’ Enigma ciphers. What Alan Turing realised is that number theory becomes very useful when applied into cryptography. Most of our internet communication is now securely stored because of the applications of number theory in cryptography (like RSA), and prime factorisation is one of the most notable techniques.

The rise of modern cryptography during WWII is one of the many technologies that have sprung from war (as Heraclitus said “War is the father of all things…”). Think of plastic surgery during WWI, NASA’s digital photography during the Cold War space race, the internet sponsored by ARPA, the first computer ‘Colossus’ during WWII…

—

A funny anecdote: Hardy was known for being an introvert, but that did not stop him from having some sense of humour. Indeed, one of Hardy’s most recurrent activities was that of ‘fooling God’ in someway or another. This becomes even funnier considering that Hardy never believed in God… Here are some examples:

-For instance, before coming back to England by boat after having visited Harald Bohr (the brother of the notable physicist) in Denmark, Hardy sent a postcard to Harald claiming (falsely) that he had solved the Riemann hypothesis (one of the most famous unresolved problems from Hilbert’s 1900 list). Why would Hardy make such a claim? According to Polya, a colleaque of his, this was Hardy’s line of thought *“if the boat sinks and Hardy drowns, everybody must believe that he has proven the Riemann hypothesis. Yet God would not let Hardy have such a great honor and so he will not let the boat sink”. *Hardy also reasoned that God would not be as generous with him as with Fermat, who achieved his fame with the homonymous last theorem shortly after he died.

-Whenever Hardy took a walk with someone next to a Church, he would always make sure that his interlocutor would be the one walking closer to the Church. Why would Hardy do that? Because he was convinced that if God decided to strike him out with a lightning bolt he would fail to him it, and incidentally hit the interlocutor closer to the Church.

-According to Polya, this is what Hardy said to a colleague of his before catching a train during a rainy day in Engelberg (a mountain resort in Switzerland): *“Please, when the train starts you open the window, you stick your head through the window, look up to the sky, and say in a loud voice: ‘I am Hardy’…. You have understood the underlying theory: When God thinks that Hardy has left, he will make good weather just to annoy Hardy”*

-Before going to cricket matches, Hardy would take with him what he liked to call the *‘anti-God battery’*. Such battery consisted of an umbrella, math papers, sweaters and all other items that (as Hardy thought) would suggest to God that Hardy was preparing himself for a rainy day. Hardy believed that if he gave God this impression, God would then make the sun shine to mock him; therefore he brought this battery every time he attended a cricket match so that he would enjoy the day with a clear sunshine.