Sieve methods and class-number problems III.