Calculate prime numbers.