Interactive Math

Prime Sieve Visualizer

Explore the inclusion, exclusion principle, the 2k−1 error bound, and the Hardy, Littlewood twin-prime conjecture, all in one sieve.

Controls

Inclusion, Exclusion Formula

Select primes to build the formula…

Actual Count vs Hardy, Littlewood Prediction

Actual remaining count H, L twin-prime prediction: C₂·n/(ln n)²

The Hardy, Littlewood conjecture estimates the count of twin primes below n as C₂ · n / (ln n)² where C₂ ≈ 1.32032. The green line shows the real count of numbers surviving your selected sieving primes; the orange line shows the theoretical twin-prime prediction. As n grows, watch how the prediction tracks the actual count.