In this methodological note, we consider the thermodynamic properties of a simple system with an infinite number of degrees of freedom --- a quantum string equivalent to an infinite set of oscillators with frequencies multiples of the fundamental frequency $\omega$. We calculate the partition function, average energy, and heat capacity of the string as functions of temperature. Using the Laplace transform of the partition function, we show that the statistical weight of a string state with energy $E = N \hbar\omega $ is equal to the number of partitions $p(N)$ of a natural number $N$ into a sum of natural numbers, and we reproduce (up to a numerical coefficient) the well-known in number theory Hardy--Ramanujan asymptotic formula for $p(N)$ provided $N\gg 1$. We show that quantizing a string is also equivalent to quantizing a one-dimensional field theory describing, in particular, a superposition of standing electromagnetic waves.
03.50.-z Classical field theories
03.70.+k Theory of quantized fields
02.10.De Algebraic structures and number theory
$^1$Department of Theoretical Physics, Faculty of Physics, M. V. Lomonosov Moscow State University\
$^2$Department of Higher Mathematics, Moscow Power Engineering Institute



