The predicate ``N is E'' will succeed whenever N is an unbound variable and E is an arithmetic expression.
Try:
X is 1+1, prime(X).