Issue #31: fix primes demo so that it doesn't rely on 0-residue.