Enter a number to find the nearest primes around it, measure the bracketing prime gap, and flag locally unusual gaps (simple heuristic). Works fully client-side.
Big integers supported (JavaScript BigInt). Commas/spaces/underscores are ignored. Max steps prevents runaway searches for huge values.
A prime gap is the distance between two consecutive primes. This tool focuses on the gap between the nearest prime below your number and the nearest prime above it.
It’s a simple comparison: if the bracketing gap is much larger than the adjacent prime gaps immediately below/above, it’s flagged. This is a quick heuristic, not a formal theorem.
It uses Miller–Rabin. It’s deterministic up to 64-bit, and very-low-error probabilistic beyond that.
Nearest primes can be far apart for large numbers. The “max steps” option limits how long the search is allowed to run.