I am not doing _that_ type of number crunching in my daily work, so the following check (in Python) has probably lots of potential for improvement:
def is_prime(n):
return not True in [n%x == 0 for x in range(2, n/2)]