ponderloop.com

Prime Number Checker

A whole number from 0 up to 3,317,044,064,679,887,385,961,980 (about 3.3 × 10^24). Commas are fine.

What to find

Is 7,919 prime?

7,919 is prime

7,919 has no divisor other than 1 and itself; it is the 1,000th prime. The nearest primes are 7,907 and 7,927.

The primes around 7,919

7,883, 7,901, 7,907, 7,919, 7,927, 7,933, 7,937

Number
7,919
Prime or composite
Prime
Method
Trial division by 2, 3 and 6k ± 1 up to 88
Previous prime
7,907 (12 below)
Next prime
7,927 (8 above)
Position among the primes
1,000th prime

The working

  1. Every composite number has a prime factor no larger than its square root, so trying divisors up to 88 is enough (88² = 7,744 ≤ 7,919 < 7,921).
  2. Try 2, then 3, then only the numbers 6k − 1 and 6k + 1 (5, 7, 11, 13, 17, 19, …): every prime above 3 has that form, so nothing else needs testing.
  3. None of them divides 7,919 exactly, so 7,919 is prime.
  4. Neighbours: testing the odd numbers down from 7,918 and up from 7,920 with the same test gives the previous prime 7,907 and the next prime 7,927.