Sieve() creates a list of primes, totients and Moebius values that grows on
demand, and sieve is the global instance the number theory functions share.
sieve$extend(n) grows the primes to at least n, and
sieve$extend_to_no(i) to at least i primes. sieve$primerange(a, b),
sieve$totientrange(a, b) and sieve$mobiusrange(a, b) return values for
the half open range. sieve$search(n) returns the indices of the primes
bounding n, equal if n is prime, and sieve$contains(n) tests membership.
sieve[i] is the i-th prime, counting from 1.