Although the prime numbers are deterministic, they can be viewed, by some measures, as pseudo-random numbers. In this article, we numerically study the pair statistics of the primes using statistical–mechanical methods, particularly the structure factor \(S(k)\) in an interval \([M\leq p \leq M + L ]\) with \(M\) large, and \(L/M \) smaller than unity. We show that the structure factor of the prime-number configurations in such intervals exhibits well-defined Bragg-like peaks along with a small ‘diffuse’ contribution. This indicates that primes are appreciably more correlated and ordered than previously thought. Our numerical results definitively suggest an explicit formula for the locations and heights of the peaks. This formula predicts infinitely many peaks in any nonzero interval, similar to the behavior of quasicrystals. However, primes differ from quasicrystals in that the ratio between the location of any two predicted peaks is rational. We also show numerically that the diffuse part decays slowly as M and L increases. This suggests that the diffuse part vanishes in an appropriate infinite-system-size limit.