WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Distribution of Primes

n
900
Euclid proved that the number of prime numbers is infinite. Prime numbers seem to be arranged in an unpredictable way, but sometimes patterns emerge. This Demonstration provides information about the distribution of primes up to the first 5000 positive integers
n
.
The array on the left consists of
n
cells that each represent a positive integer from 1 to
n
, counting left-to-right, top-to-bottom. Black cells represent prime numbers. The array illustrates the distribution of prime numbers among the positive integers.
The graph on the right shows the cumulative distribution of the primes and its approximation by the formula
n
log(n)
, which was first conjectured by Gauss and plays a role in the prime number theorem.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.