Problem 123: Update with current `primes` implementation