G.H. Hardy famously argued in his 1940 essay A Mathematician's Apology that number theory was the "queen of mathematics" precisely because it had no practical applications, which he believed kept the field "gentle and clean" and prevented its misuse in warfare. ⁠ He explicitly stated that "no one has yet discovered any warlike purpose to be served by the theory of numbers," contrasting it with applied fields like physics or engineering. ⁠

However, this view was proven incorrect in the decades following his death. Number theory later became the foundational basis for public-key cryptography (such as the RSA algorithm), coding theory, and random number generation, which are now critical for internet security, online commerce, and military communications. Additionally, the Hardy-Ramanujan formula for partition functions found significant applications in quantum physics and statistical mechanics, particularly in describing the decomposition of atomic nuclei.

AI-generated answer. Please verify critical facts.
🌐
Wikipedia
https://en.wikipedia.org › wiki › A_Mathematician's_Apology
A Mathematician's Apology - Wikipedia
3 weeks ago - One of the main themes of the book is the beauty that mathematics possesses, which Hardy compares to painting and poetry. For Hardy, the most beautiful mathematics was that which had no practical applications (pure mathematics) and, in particular number theory, Hardy's own field.
🌐
Plover
https://blog.plover.com › math › Hardy.html
The Universe of Discourse : G.H. Hardy on analytic number theory and other matters
In fact, there is such an algorithm—the "simplex algorithm"—and it is known to have exponential time in the worst case, a fact which is of decidedly limited practical interest. In analytic number theory, however, two facts weigh in favor of rigor. First, the objects you are studying are the positive integers. You already have as much intuitive understanding of them as you are ever going to have; you are not, through years of study and analysis, going to come to a clearer intuition of the number 3. And second, analytic number theory is much more inward-looking than most mathematics. The applications to the rest of mathematics are somewhat limited, and to the wider world even more limited.
Discussions

What are the practical applications of number theory?
One of number theory's most relevant applications today is in cryptography . More on reddit.com
🌐 r/math
19
9
September 23, 2015
history - How did G.H. Hardy's work contribute to today's public-key cryptography? - Cryptography Stack Exchange
I know that Hardy's work in number theory was used by Clifford Cocks in 1973 to develop the basis for public-key cryptography. What specifically was this work, and how is it used today in cryptogr... More on crypto.stackexchange.com
🌐 crypto.stackexchange.com
soft question - Is there any branch of Mathematics which has no applications in any other field or in real world? - Mathematics Stack Exchange
Is there any branch of Mathematics which has no applications in any other field or in real world ? for instance , maybe : number theory ? mathematical logic ? is there something like this ? More on math.stackexchange.com
🌐 math.stackexchange.com
January 26, 2013
Hardy and Wright's Theory of Numbers
While Hardy and Wright were clearly very intelligent, you're giving them a bit too much credit. Bear in mind they didn't come up with much of the material in the book. The content of the book spans centuries. Don't be discouraged just because something seems like magic at first reading. For example, the proof that 641 is a factor of F_5 given early on comes out of nowhere. But it took Euler to find it; Fermat himself conjectured F_5 was prime. And a lot of these slick proofs won't have just been devised quickly, it takes time. More on reddit.com
🌐 r/math
3
0
June 11, 2021
🌐
Jcu
http://home.pf.jcu.cz › ~sbml › wp-content › uploads › Klaska.pdf pdf
REAL-WORLD APPLICATIONS OF NUMBER THEORY JIˇR´I KLAˇSKA
Abstract. The present paper is concerned with practical applications of the · number theory and is intended for all readers interested in applied mathemat-
🌐
DOAJ
https://doaj.org › article › 6aa4720a0ab04890ae1ff06c268a69f6
Real-world applications of number theory – DOAJ
February 1, 2024 - However, for many years number theory had only few practical applications. It is well known that the great English number theorist Godfrey Harold Hardy (7 February 1877-1 December 1947) believed that number theory had no practical applications.
🌐
Ui
https://math-sci.ui.ac.ir › jufile pdf
real-world applications of number theory
few practical applications. It is well known that the great English number theorist Godfrey Harold · Hardy (7 February 1877-1 December 1947) believed that number theory had no practical applications.
🌐
Wordpress
https://blngcc.wordpress.com › wp-content › uploads › 2008 › 11 › hardy-wright-theory_of_numbers.pdf pdf
Introduction to the Theory of Numbers
Suppose that p is prime and p 1 ab. Ifp 1 a then (a, p) = 1, and there-fore, by Theorem 24, there are an x and a y for which xaf yp = 1 or xab+ypb = b. But p 1 ab and p lpb, and therefore p 1 b. Practically the same argument proves
🌐
Algorithmica
https://en.algorithmica.org › hpc › number-theory
Number Theory - Algorithmica
Ironically, this statement was proved very wrong just 5 years later with the development of the atomic bomb, which would not have been possible without the understanding of relativity, and the inception of computer-era cryptography, which extensively builds on number theory — the computational aspect of which is the main topic of this chapter.
🌐
Cambridge Core
https://cambridge.org › core › services › aop-cambridge-core › content › view › B4EC068F70EBCBA86E5F536F75444DCE › S1446788700034984a.pdf › hardys-legacy-to-number-theory.pdf pdf
Hardy's legacy to number theory
Now let me return to 'Partitio Numerorum'. Hardy and Littlewood [49,50] also · turned their attention towards the other famous pair of questions of additive number · theory, namely the Goldbach problems, firstly as to whether every even number greater
Find elsewhere
🌐
Arvind Gupta Toys
https://arvindguptatoys.com › arvindgupta › mathsapology-hardy.pdf pdf
A Mathematician's Apology
It is therefore the better worth remarking that neither theorem has the slightest ‘practical’ importance. In practical application we are concerned only with comparatively small numbers; only stellar astronomy and atomic physics deal with ‘large’ numbers, and they have very little more practical importance, as yet, than the most abstract pure mathematics.
🌐
Cambridge Core
https://cambridge.org › core › services › aop-cambridge-core › content › view › B4EC068F70EBCBA86E5F536F75444DCE › S1446788700034984a.pdf › hardys-legacy-to-number-theory.pdf&gsessionid=HGh3eVQs03QOr9G3lgAqWPDvHtopVcK0SyQB2QKOjIC-7Km8WHf2yQ pdf
Hardy's legacy to number theory
Recently the Hardy-Littlewood method has been used to obtain results of this kind regarding the distribution of general sequences into arithmetical progressions [118]. A very ingenious adaptation of the Hardy-Littlewood method was made by Roth [95,96] in order to show that any subset sf of [1, n] C\ Z which has no three members in arithmetic progression satisfies card srf = o(n). Later Szemeredi [107] showed by a different method that the conclusion still held even when the hypothesis was weakened to £? having no k members in arithmetic progression. Then Furstenberg [33] gave another proof of Sezemeredi's theorem based on ergodic methods, and some of the other applications of his methods have the flavour of a variant of the Hardy-Littlewood method.
🌐
arXiv
https://arxiv.org › pdf › 2008.08187 pdf
arXiv:2008.08187v1 [math.NT] 18 Aug 2020 ON HARDY’S APOLOGY NUMBERS HENK
Then we show that for a specific F, the cardinality of all F-Hardy’s apology numbers obtained from the H1 equation mentioned above is finite (see Definition 1.1 and Theorem 1.3). Let us recall that an n−digit number in base b is called a base-b Armstrong number of nth order if it is equal to the sum of the nth power of its digits in base b (see Definition 2.1). In Section 2, we discuss Armstrong numbers and their generalization. It happens that Armstrong numbers have applications in “data security” [9, 8, 16].
🌐
benny
https://benchugg.com › writing › studying-useless-things
On studying useless things
August 1, 2024 - But all of these applications use math that is very old and not very sophisticated. What about more abstract, theoretical mathematics? This objection is best answered by simply listing examples. Hardy’s favorite useless subject, number theory (and elliptic curves in particular), turned out to be central to cryptography; the Radon transform is integral to tomography; differential geometry describes the curvature of spacetime and is core to general relativity; topology is used to unfold large telescopes in space, conic sections (studied as pure maths by the Greeks) turned out to describe plane
🌐
MIT OpenCourseWare
https://ocw.mit.edu › courses › 6-042j-mathematics-for-computer-science-fall-2010 › a608e339ab265c79de46c7c3830a49cb_MIT6_042JF10_chap04.pdf pdf
“mcs-ftl” — 2010/9/8 — 0:40 — page 81 — #87 4 Number Theory
water jug tests in Die Hard 4: Live Free or Die Hard, rumor has it that the jugs will ... It would be nice if we could solve all these silly water jug questions at once. In · particular, how can one form g gallons using jugs with capacities a and b? That’s where number theory comes in handy.
Top answer
1 of 2
2

I've been investigating and can't seem to find any reference to this. Could you say how you found this out?

Cocks's original paper makes reference to several results from number theory without attribution.

  • An algorithm for determining if a number $M$ is prime with $\log M$ work, but which may fail to provide an answer (I think that this might be Pocklington's algorithm).
  • A reference to the density of primes being roughly $1/\log M$, which is an observation of Gauss proven by Hadamard and de la Vallée Poussin
  • The complexity of modular exponentiation being $(\log M)^k$ which is over 2000 years old (see Knuth vol. 2 for some history).
  • An algorithm for factoring with complexity $N^{1/4}(\log N)^k$ (I think that this might be either Daniel Shanks's SQUFOF or CLASNO method).

G. H. Hardy made a large number of contributions to number theory, but none seem to be directly connected to any of the results used by Cocks.

2 of 2
1

I think there may not be any more to this than "despite what Hardy said regarding Number Theory has no applications...". A few links I dug up, none of which indicate any link to any concrete result by Hardy playing a role in this discovery.

  1. Part of the oration by Nigel Smart at the ceremony for honorary PhD for Cocks.

http://www.bristol.ac.uk/graduation/honorary-degrees/hondeg08/cocks.html

In 1940, the famous mathematician G.H. Hardy had remarked that Relativity and Number Theory were the truly great parts of mathematics as they had not been tainted by finding application. Hardy was soon proved wrong about relativity by the advent of the nuclear age, but in 1973 he was still correct about number theory. Clifford was about to alter that position for good by finding the most compelling application of Number Theory.

  1. Excerpt from Simon Singh's book which talks about this Alternative History of Public Key Crypto is below.

https://cryptome.org/ukpk-alt.htm

When Cocks did eventually realise what he had done, it struck him that his discovery might have disappointed G.H. Hardy, one of the great English mathematicians of the early part of the century. In his The Mathematician's Apology, written in 1940, Hardy had proudly stated: 'Real mathematics has no effects on war. No one has yet discovered any warlike purpose to be served by the theory of numbers.' Real mathematics means pure mathematics, such as the number theory that was at the heart of Cocks's work. Cocks proved that Hardy was wrong. The intricacies of number theory could now be used to help generals plan their battles in complete secrecy. Because his work had implications for military communications, Cocks, like Ellis, was forbidden from telling anybody outside GCHQ about what he had done. Working at a top-secret government establishment meant that he could tell neither his parents nor his former colleagues at Cambridge University. The only person he could tell was his wife, Gill, since she was also employed at GCHQ.

  1. Ensuing discussion on uk-crypto mailing list:

https://cryptome.org/ukpk-true.htm

The main item of interest there is Ross Anderson claiming that the papers from GCHQ regarding Cocks' invention were "forged, not originals", since at that point even the existence of the GCHQ was denied.

  1. Comments by Diffie

https://cryptome.org/ukpk-diffie.htm

🌐
arXiv
https://arxiv.org › html › 2008.08187.pdf
On Hardy’s Apology Numbers
As for the mathematics, even the simplest operation in this paper, i.e. the sum of digits function, has application outside number theory in the domain of combinatorics [13, 26, 27, 28, 34] and in a seemingly unrelated mathematical knowledge domain: topology [21, 23, 15]. Papers about generalizations of the sum of digits function are discussed by Stolarsky [38]. It also is a surprise to see that another topic of this paper, i.e.
🌐
Columbia University
https://math.columbia.edu › ~goldfeld › RAMANUJAN.pdf pdf
APPLICATIONS OF THE HARDY-RAMANUJAN PARTITION THEORY
APPLICATIONS OF THE HARDY-RAMANUJAN PARTITION THEORY ... In 1918 G.H. Hardy and S. Ramanujan [H-R] gave an asymptotic formula for · the now classic partition function p(n) which equals the number of unrestricted
Top answer
1 of 5
77

Lots of branches of mathematics currently have no application in any other field or the real world. As you get higher up the ivory tower, the object that you're studying becomes so esoteric, that there might not be relevance to other things.

However, that does not preclude the possibility that someone eventually finds a relevance for it. Before the 20th century, Number Theory was considered recreational, 'useless' math. It has since spawned a huge industry of security.

Of course, someone might come along and say "Hey, there's this connection between (this esoteric field) and (that esoteric field)", like what Andrew Wiles did (Andrew Wiles proved Fermat's last theorem using many techniques from algebraic geometry and number theory [Source:Wikipedia]).

2 of 5
14

That depends on the resolution you look at things. But essentially everything ends up with some application to something else.

It may be tempting to say things like "modern set theory is not useful to other branches of mathematics other than set theory". But this is not true at all.

Set theory is useful for model theory and general topology; and model theory is very useful for algebra, and general topology is useful in analysis; both algebra and analysis are useful in real world problem-solving.

So set theory ends up as being very useful. One can look closer and ask, "Why does research about infinite and bizarre sets whose existence is negated by the axiom of choice - a common assumption nowadays - is useful?" The answer, of course, is similar to the above, with an additional twist: even if we may not know right now what are the applications, in research new methodologies and ideas are developed, and those trickle and drizzle slowly from one field to another. Eventually things become useful.

For example number theory, which a century ago was considered without real world application, is now a key theory in cryptography which is a very important tool in the modern world.

🌐
Infinitelymore
https://infinitelymore.xyz › infinitely more › number theory — proof and the art of mathematics
Number theory — Proof and the Art of Mathematics
November 23, 2023 - And yet, despite this, in a strange and surprising twist of fate, the theory has in contemporary times found key practical applications; deep number-theoretic ideas, for example, lie at the core of cryptography and internet security.
hardy number theory pno practical applications - Brave Search