On Functions Satisfying Modular Equations for Infinitely Many Primes