I am giving a talk on String theory to a math undergraduate audience. I am looking for a nice and suprising mathematical computation, maybe just a surprising series expansion, which is motivated by string theory and which can be motivated and explained relatively easily. Examples of what I have in mind are the results in Dijkgraaf's "Mirror symmetry and the elliptic curve", or the "genus expansion" of the MacMahon function (aka DT/GW for affine threespace), but I am not sure I can fit either into the time I have. Any thoughts?

8$\begingroup$ What is the actual background of your audience? The word "undergrad" can have various meanings depending on where you are speaking. Also, if you're not sure yourself about an example that can be explained easily to your audience, is string theory really the right topic to be discussing? $\endgroup$ – KConrad Nov 30 '10 at 11:35
Two counting problems  from my own very biased and personal viewpoint  that can perhaps be motivated:
 Counting triangles on the torus = theta function relation for elliptic curve. (I tried to squeeze this into a public lecture one time.)
 Counting symmetric polynomials of degree k in 24 variables = partition function of chiral bosonic string => counting curves on K3 by heterotic duality: 24, 24 + 24*25/2 = 324, etc.
But these can't beat calculating an actual partition function (as in Richard Eager's answer), unless you're trying to emphasize mathiness.

$\begingroup$ It there any explanation for = ? I can count polynomials in dim 24, and understand the heuristics (a la Beauville) of counting curves on rational curves on K3, but what is the relation? (apart from the answer) $\endgroup$ – Dmitri Panov Mar 29 '11 at 22:30

$\begingroup$ Do you have a link expanding on the triangle counting? It sounds interesting but I don't know it. $\endgroup$ – Dan Piponi Jun 16 '14 at 22:40
Ginsparg's Applied Conformal Field Theory (hepth/9108028 section 7.6) has a nice proof of the Jacobi TripleProduct formula and Euler's pentagonal number theorem. The equalities can be interpreted as the equivalence between the partition function of a free chiral boson and the partition function of two chiral fermions on a torus. This is an example of bosonization and plays an important role in string theory.
The proof can be explained without any reference to physics, but the crucial difference in statistics (Boson/Fermion) employed in the proof becomes obscured.

8$\begingroup$ <grouch>It's not really string theory until you sum over genera...or at least integrate over $\overline{M}_{0,n}.</grouch> $\endgroup$ – userN Nov 30 '10 at 13:21
I've given a talk about the equivalence between 1+1 TQFTs and Frobeneus algebras to an undergraduate audience with great success. It has great pictures and a clear, beautiful idea. The "computation" can then be the beautiful formula for the number of degree $d$ covers of a genus $g$ Riemann surface as a sum over irreducible representations of the symmetric group $S_d$
$$Z(g)=\sum _{R} \left(\frac{d!}{\dim(R)}\right)^{2g2}$$
That last computation requires that your audience knows some representation theory of finite groups, but that might be true for the Oxford undergrads.

1$\begingroup$ A good reference where you can find the great pictures: mat.uab.cat/~kock/TQFT.html $\endgroup$ – Qiaochu Yuan Nov 30 '10 at 20:52
I agree that computing partition functions has many pretty applications. My favorite is the use of Jacobi's abstruse identity between theta functions, $\theta_3^4\theta_4^4=\theta_2^4$, to show the equality between the number of bosons and fermions in open superstring theory as required by supersymmetry. This is explained in sec 4.3 of "Superstring Theory" by Green, Schwarz and Witten.
Another short calculation which quickly gets to the heart of the connection between string theory and gravity is the demonstration that bosonic string theory contains a massless spin two excitation. One way to do this requires regularizing a divergent zero point energy via $\sum_{n=1}^\infty n \rightarrow \sum_{n=1}^\infty n^{s}$ and then analytically continuing to $s=1$ to obtain $\zeta(1)=1/12$. See sec 2.3 of GSW.
Maybe derive the Polyakov formula? Like KConrad says, whether it can be understood on an undergraduate level depends a lot on your presentation and the level of the undergraduates. But the basic idea behind the formula, if I remember correctly, can all be explained using a little bit of Riemannian geometry/representation theory plus a bit of complex analysis.
(I recently saw a talk where it was perfectly understandable and impressive for masterslevel students.)
(You can also segue into explaining why the universe is 26 dimensional.)
Derive the Casimir Energy in Bosonic String Theory.
You start with the $\hat L_0$ operator and get rid of the nonvacuum $\displaystyle\frac{\alpha_0^2}{2}+\sum_{n=1}^\infty\alpha_{n}\cdot\alpha_n$, then you use a Ramanujam sum to do $\zeta$function renormalisation, from which you find out that the vacuum energy denoted by $\varepsilon_0$ is
$$\varepsilon_0=\frac{d2}{24}$$
However, the most interesting part comes when you go around deriving the critical dimension of Bosonic String Theory.
After which, the expression surprisingly simplifyies to a $1$.
For a more detailed derivation of the above stuff, see these lecture notes/. (Section 4) (Equation 4.54.10)