Any Practical Application for Prime Other Than Cryptography? 
Possible Duplicate:
Real world applications of prime numbers? 

Is there any practical application (I mean outside mathematics) for prime numbers other than cryptography?
 A: In physics and chemistry we are often interested in the energy levels of a particular atom (a matter of particular importance in simulations of nuclear reactions).
Unfortunately, the only atom for which we have an exact solution for the energy levels is Hydrogen. For other atoms, we must compute the energy levels using approximate methods. For atoms that aren't much larger than Hydrogen (e.g. Helium, Lithium) we can use perturbation theory. However, this quickly becomes intractable as you add more particles to the nucleus. Going beyond this, you can use computational methods to solve for the eigenvalues of the quantum Hamiltonian, but this can be time consuming and prone to numerical error, and the results can be difficult to interpret.
Another approach is to apply statistical methods to characterize the distribution of the energy levels. It turns out that a good model for the heavy atoms (e.g. Uranium, Plutonium) is to take a random Hermitian matrix as the quantum Hamiltonian. The distribution of eigenvalues of a random Hermitian matrix can be derived analytically, and it follows the semi-circle law. You might also be interested in the two-point correlation function (which tells you if energy levels tend to cluster, or are spread evenly), which you can calculate, and it turns out to be
$$p(x) = 1 - \left( \frac{\sin\pi x}{\pi x} \right)^2$$
All of this was well known in 1972, when the physicist Freeman Dyson was visiting the Institute for Advanced Study in Princeton. He got into conversation with the number theorist Hugh Montgomery, who was studying the zeros of the Riemann zeta function. The zeta function is known to be intimately connected to the prime numbers, since it can be expressed as a product over the primes
$$\zeta(s) = \prod _p \left( 1 - \frac{1}{p^s}\right)^{-1}$$
This is known as Euler's product formula. Dyson asked Montgomery what his latest results were, and Montgomery responding by telling Dyson that he'd calculated that the two-point correlations of the zeta function go like
$$p(x) = 1 - \left( \frac{\sin\pi x}{\pi x} \right)^2$$
That is, exactly the same as the two-point correlations of the energy levels in a model for the Uranium atom! This surprising coincidence has led to collaborations between number theorists and theoretical physicists, and to results from the theory of prime numbers applied to the study of nuclear physics.
A: Calculations in computers are typically done either mod powers of two (2^32 or 2^64) or in IEEE floating-point format. One of the alternate formats for numbers is the CRT form, in which the residues of the number mod several coprime moduli is stored. This has some advantages, like making multiplication faster. But you can't efficiently divide with numbers in this form unless you choose the moduli to be prime.
