Calculate prime numbers