Maxima Function
prev_prime (n)
Returns the greatest prime smaller than n.
(%i1) prev_prime(27); (%o1) 23