The structure factor of primes