%N prime %F $MIR/src/subs/prime.for
%D Returns a prime less than or equal to N.
%P jm
%: numbers, mathematics
%B
        integer function prime(n)

        implicit none
        integer n

  This returns a prime less than or equal to N.

  Input:
    n          Number to find a prime close to.
  Output:
    prime      The closest prime less than or equal to n.
