Number theory and physics I was following some lectures by Edward Frenkel about Langlands correspondence. He was describing some analogies between number theory and theoretical physics (Mirror symmetry). At some point ( my lack of knowledge) I had the impression that the relation between number theory and "real" physics is a speculation, probably I am wrong. I wanted to ask if there is more basic examples to  explain such interaction between number theory and physics. Examples are welcome. 
Edit November 25: Thank you for your answers, my question was vague, sure. I have noticed that all mathematical talks related to some "unrealistic" physics start with a claim saying "the motivation comes from physics". I find this way to motivate some wonderful mathematics (Langlands program,...) not really helpful, and in some sense not honest. I don't claim that there is no relation. I would like to see a clear example in the particular case of number theory and physics with an explanation, references are welcome but a personal explanation will be better. I'm sure I'm not the only one curious about these questions... 
 A: There is a whole bunch of examples, please the e.g. as a starting point 
the classical book by Manfred Schroeder (http://www.springer.com/us/book/9783540852971) or the journal "Communications in Number Theory and Physics"
(http://intlpress.com/site/pub/pages/journals/items/cntp/_home/_main/) or the website http://empslocal.ex.ac.uk/people/staff/mrwatkin//zeta/physics.htm.  
A: The rational numbers $\mathbb{Q}$ are central to number theory, so I think it would be reasonable to claim a connection between number theory and ``real” physics if there were a physical system with properties that can be measured experimentally and which exhibits special behavior when a physical parameter taking values in $\mathbb{R}$ takes on rational values. 
There is such a system consisting of electrons confined to move in two spatial dimensions, subject to a periodic potential and in a magnetic field which is transverse to the two-dimensional plane of motion. This system was analyzed in work by D. Hofstadter and others and the plot of the energy spectrum of this quantum mechanical system is often called Hofstadter’s butterfly. The physics is governed by the
ratio of the flux of the applied magnetic field through a unit cell of the lattice to magnetic flux quantum $\Phi_0=h/e$ and when this ratio takes on rational values the energy spectrum has a band structure determined by the denominator of this rational number.  
A picture of Hofstadter’s butterfly can be found on the Wikipedia page
https://en.wikipedia.org/wiki/Hofstadter%27s_butterfly
and is attached below.

Experimental confirmation of this structure was found by two different groups in 2013 in
graphene devices on hexagonal nitride substrates. Here the effect is slightly more complicated
than described above and involves the relation of the applied magnetic field to the Moire pattern
coming from the orientation of the graphene lattice to the boron nitride lattice. References to the experimental results can also be found in the Wikipedia page.
A: Multiple harmonic sums are used in Quantum Field Theory  to express single scale problems in massless and massive perturbative calculations. These sums are defined by
\begin{align*}
S_{\alpha_1,\ldots\alpha_n}(N)=\sum_{k_1=1}^{N}\sum_{k_2=1}^{k_1}\cdots
\sum_{k_n=1}^{k_{n-1}}\frac{\text{sign}(a_1)^{k_1}}{k_1^{|a_1|}}\cdots\frac{\text{sign}(a_n)^{k_n}}{k_n^{|a_n|}}
\end{align*}
with $a_k$ being positive or negative integers. They are associated to Mellin transforms of real functions or Schwarz distributions and they are also related to harmonic polylogarithms.
According to Algebraic Relations Between Harmonic Sums and Associated Quantities (2003) by J. Blümlein these sums help to considerably reduce the complexity of expressions of Mellin moments of Wilson coefficients and splitting functions relevant in QED and QCD.
Two nice presentations by J. Blümlein are


*

*Mathematical Structures of QCD Wilson Coefficients and Anomalous Dimensions (2004)

*Mathematical Structures in higher order calculations (2010)
the first one also impressively demonstrates the complexity of involved expressions.
A: Many wonderful answers here, but it is perhaps useful to note that Frenkel's setting has the feature that number fields are not "directly" entering the physics in the Langlands story (I dont know which particular talk the OP is referring, but I have a feeling what I say will be true). The setting for Langlands duality in physics is the study of four dimensional maximally supersymmetric Yang-Mills theory (usually called $\mathcal{N}=4$ SYM) with some gauge group G. This theory has a highly non-trivial (and still conjectured) S-duality which relates the the theory with gauge group $G$ and coupling $\tau$ to  $\mathcal{N}=4$ SYM with gauge group $G^\vee$ and coupling $-1/\tau n_r$, where $n_r$ is the ratio of the length of the long root to that of the short root in the root system of $G$. Now, these groups are compact Lie groups. The representation theory of the complex Lie Group enters the study of this gauge theory in various essential ways that I won't try to recall here. In the setup of Kapustin-Witten, this theory is the starting point and one studies this theory(+some decorations) under dimensional reduction (after a procedure called twisting) on a Riemann surface C down to two dimensions. Such a study leads one to the Geometric Column (Groups are over $\mathbb{C}$) of the Langlands story. The other settings to study the Langlands story can be : Curves over finite fields, or directly for Number fields. Frenkel usually writes these are different "columns" for the Langlands story.  Now, it happens that "suitable" statements made in the geometric setting can be taken over to other columns. But, the "suitable" caveat is important (and I am by no means an expert on when you can jump between columns). 
So, in the Langlands setting, it may be best to try think of the link between Number Theory and Physics as being a mediated one.
(Number Theory Questions addressed by Langlands)  ---- (Something) --- (Physics of a particular Supersymmetric Gauge Theory) 
This mediating is often done by Geometric Representation Theory (GRT). Here, the theory for infinite dimensional representations of the Complex Group plays an essential role. I'd be tempted to replace the "something" by GRT, but I will resist the temptation since I don't know the Number Theory setting well enough. One should also think of the above as a schematic and not as something that is a done deal. 
Back to the theme of the OP's question, to answer it, one may first ask if a Group over Number fields $G(\mathbb{Z})$ is directly entering a physics setup. This is often the case in examples. Many of the examples that people have noted fall in this category. Even the $\mathcal{N}=4$ theory has a $SL(2,\mathbb{Z})$ duality. The S-duality transformation recalled above is a particular element in this full $SL(2,\mathbb{Z})$ duality. Now, the $SL_2$ appearing in the duality group here is very interesting, but this is not the group identified (in the KW setup) with the reductive group needed for the Langlands story. 
This example illustrates a useful point that in cases where a $G(\mathbb{Z})$ is entering the physics directly, you typically don't have a lot of freedom to play with what the '$G$' can be. However, in setting for the Gauge Theory approach to Geometric Langlands, the reductive Group needed for Langlands is identified with a Gauge Group of a 4d QFT. Now, you get a lot of freedom for what '$G$' can be. But the connection to Number Theory itself is less direct (mediated as above). 
Further Refs : Here are a couple of very good posts on MO that explain things in more detail. Frenkel's book, "Love and Math" (cited by other answers as well) is also a fantastic source. 
A: A really "real" example is the relation between integral quadratic forms (i.e. integral lattices) and conformal field theories of free compact bosons. The latter is basically defined by an integral lattice, so the connection to integral quadratic forms is natural. They describe the excitations on the boundary of a novel quantum state of matter, the fractional quantum Hall(FQH) state (to be more precise, the Abelian ones), and things like lengths of vectors in the lattice are measured in experiments. The connection does not stop here: the integral equivalence of quadratic forms defines the equivalence of the conformal field theories. More surprisingly, the genus of the lattices (i.e. p-adic equivalence for prime factors of the discriminant) is closely related to the bulk-boundary correspondence of the FQH states, namely lattices in the same genus can occur on the boundary of the same FQH state.
Closely related, one should also mention the Moonshine. The physics is the following: there is a conformal field theory obtained by orbifolding free bosons compactified on the Leech lattice, whose partition function on a torus is the $j$ function. The Monster group shows up as the automorphism of the CFT.
A: You can find a huge collection of examples in this website:


*

*Number Theory and Physics Archive
As for a concrete example, the critical temperature of the Bose-Einstein condensate is
$$T=\left(\frac{n}{\zeta(3/2)}\right)^{2/3}\frac{2\pi \hbar^2}{mk_B}$$
where $\zeta(s)$ is the Riemann zeta function.
Particularly after the work of Ketterle, this seems as "real" and non-speculative as it gets.
A: My comment follows a possible relation between

Number Theory and Gravity (physics).

Langlands program is a web of conjectures about connections between number theory and geometry. Robert Langlands (1967, 1970) seeks to relate Galois groups in algebraic number theory to automorphic forms and representation theory of algebraic groups over local fields and adeles.
Geometric Langlands correspondence is a geometric reformulation of the number theoretic Langlands correspondence.
There is a well-known relation between the Geometric Langlands Program and Electric-Magnetic Duality or  S-duality in certain quantum field theories (mentioned by earlier answers) ---

N=4 super Yang-Mills theory in four dimensions.

More precisely, the geometric Langlands program can be described in a natural way by compactifying on a Riemann surface a twisted version of N=4 super Yang-Mills theory in four dimensions. See hep-th/0604151, Anton Kapustin, Edward Witten (2006). The key ingredients are

*

*the electric-magnetic duality of gauge theory,

*mirror symmetry of sigma-models,

*branes,

*Wilson and 't Hooft operators, and

*topological field theory.

Hecke eigensheaves and D-modules can be explained from the physics.
Since N=4 super Yang-Mills theory in four dimensions plays a key role in the

gauge-gravity duality

or

the AdS/CFT duality

the duality between

Type IIB string theory on AdS5 × $S^5$ space (a product of 5-dimensional AdS space with a 5-dimensional sphere); or the supergravity

and

N = 4 super Yang–Mills

on the 4-dimensional boundary of AdS5.

It may be possible to find useful guidance to look at the number theory, or the (Geometric) Langlands correspondence through the gravity theory (like the AdS5 space in Type IIB string theory or the supergravity).
Another direction is the p-adic AdS/CFT may offer help on this problem.

The precise potential of the development is asked as a new question here: Number Theory and Gravity . Experts in the field please feel free to comment/answer this.
