  We advance a general theory of field correlation revivals of structured
random wave packets, composed of superpositions of propagation-invariant modes,
at pairs of planes transverse to the packet propagation direction. We derive an
elegant analytical relation between the normalized intensity autocorrelation
function of thus structured paraxial light fields at a pair of points on an
optical axis of the system and a Gauss sum, thereby establishing a fundamental
link between statistical optics and number theory. We propose and
experimentally implement a simple, robust analog random wave computer that can
efficiently decompose numbers into prime factors.
