prevPrime(n) returns the greatest prime number smaller than or equal to n, if such a number exists (i.e. if n≥2).