We show that for each prime p > 7, every residue mod p can be represented by a squarefree number with largest prime factor at most p. We give two applications to recursive prime generators akin to the one Euclid used to prove the infinitude of primes.