The fundamental importance of prime numbers for mathematics is that all other natural numbers can be represented as a unique product of prime numbers. For centuries, mathematicians have been trying to find an order in the occurrence of prime numbers. Since Riemann´s paper on the number of primes under a given size, the distribution of the primes is assumed to be random. Here, I show that prime numbers are not randomly distributed using three parametric sine functions. Their positions are determined by the order of occurrence of the nonprimes of types 6n+5 and 6n+1. Furthermore, I will show an exact primality test using these three parametric sine functions.