Paste source code from arith.py for 'primes' function.