  We report on prime number decomposition by use of the Talbot effect, a
well-known phenomenon in classical near field optics whose description is
closely related to Gauss sums. The latter are a mathematical tool from number
theory used to analyze the properties of prime numbers as well as to decompose
composite numbers into their prime factors. We employ the well-established
connection between the Talbot effect and Gauss sums to implement prime number
decompositions with a novel approach, making use of the longitudinal intensity
profile of the Talbot carpet. The new algorithm is experimentally verified and
the limits of the approach are discussed.
