Sigh ... one of my intermediate versions of is_prime() returns True if the n is *not* prime, and false otherwise. The final version is correct, though. Dale.