Prime numbers between 1 and 5,000
There are 669 prime numbers between 1 and 5,000: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, ⦠4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999.
How to work it out
- 1
A prime has exactly two factors, 1 and itself. To list them, cross out multiples of 2, then 3, then 5, and so on up to ā5000 ā 70.7 (the sieve of Eratosthenes). What is left are the primes.
- 2
That leaves 669 primes between 1 and 5,000, with a total of 1,548,136.
- 3
The biggest gap between neighbouring primes in this range is 34, after 1327 (the next prime is 1361). There are 126 twin prime pairs (primes 2 apart), the first ones (3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), (59, 61), (71, 73).
How many primes in each part
| Range | Primes | Share of the numbers |
|---|---|---|
| 1 to 1,000 | 168 | 16.8% |
| 1,001 to 2,000 | 135 | 13.5% |
| 2,001 to 3,000 | 127 | 12.7% |
| 3,001 to 4,000 | 120 | 12% |
| 4,001 to 5,000 | 119 | 11.9% |
Questions
How many prime numbers are there between 1 and 5,000?
669.
What is the biggest prime number below 5,000?
4999.
What is the first prime number after 0?
2.