  Truncated Fourier, Gauss, Kummer and exponential sums can be used to
factorize numbers: for a factor these sums equal unity in absolute value,
whereas they nearly vanish for any other number. We show how this factorization
algorithm can emerge from superpositions of classical light waves and we
present a number of simple implementations in optics.
