added number-theoretic motivation