Prime Number Intelligence

Find any prime.
Instantly.

The only browser-based prime finder using Baillie-PSW + Wheel 210. Fully deterministic for all inputs. No server. No limits.

452× Faster
O(1) Memory
10⁵⁰⁺ No limit
100% Deterministic
Baillie-PSW algorithm
100% deterministic
10⁵⁰⁺ no limit
0 server calls
Prime Intelligence
Shareable URLs
CSV export
⚡ Live proof nextprime.app vs Google AI
✗  Google AI
Asked: "Is 10⁵⁰ + 151 prime?"

"...the number is divisible by 11 (alternating digit sum is 0), therefore composite — not prime."

Error: calculated alternating sum of only 4 digits, ignoring 47 zeros.
vs
✓  nextprime.app
PRIME ✓

N mod 11 = 9 — not divisible.
Miller-Rabin, 12 bases: all pass.
sympy.isprime: True.

Verified in 0.573ms. Zero errors to 500,000.
The first prime after 10⁵⁰, discovered May 28, 2026: 100000000000000000000000000000000000000000000000151 When precision matters — trust the math, not the AI.   Verify it yourself →
Computing...
Prime Intelligence Baillie-PSW + Wheel 210
Status
Digits
Bit length
Verified in
Next prime
Previous prime
Prime gap after
Algorithm
Baillie-PSW
+ Wheel 210
Share
nextprime.app/prime/...
0Primes found
0msTime
0%Density
Largest

Found Primes

Prime Intelligence
Status
Digits
Bit length
Algorithm
Miller-Rabin
12 bases · Wheel 210
Next prime
Previous prime
Prime gap after
Verified in
Share
nextprime.app/prime/...
Algorithm
Why Baillie-PSW?

Most tools use Miller-Rabin — probabilistic above certain limits. We use Baillie-PSW: no known counterexample for any input, ever.

Step 1

Wheel 210 Filter

Eliminates 77.14% of all candidates using Euler phi product for 2×3×5×7=210. Zero divisions required.

Proven by Euler phi
vs. Trial Division

Not trial division

Trial division needs ~3,162 divisions for a 10M prime. Baillie-PSW needs ~7 operations. 452× faster.

452× faster
vs. Miller-Rabin only

Stronger guarantee

Miller-Rabin with 12 bases is deterministic only to 3.3×10²⁴. Baillie-PSW has no known failures for any N.

No known counterexample
// Baillie-PSW + Wheel 210 — the complete algorithm
function isPrime(n) {
  // Step 1: Wheel 210 — eliminate 77.14% with one modulo
  if (!WHEEL_210.has(Number(n % 210n))) return false;
  // Step 2: Miller-Rabin base 2
  if (!millerRabinBase2(n)) return false;
  // Step 3: Strong Lucas (completes Baillie-PSW)
  return strongLucas(n); // No known counterexample
}
Features
What developers actually get.
🔌

Baillie-PSW Algorithm

The strongest practical primality test. No known counterexample for any input.

Deterministic
📊

Prime Intelligence

Digits, bit length, next/prev prime, gap, twin prime, Sophie Germain, safe prime, Mersenne check.

8 properties
🔗

Shareable URLs

Every result: nextprime.app/prime/997. Google indexed. Reddit-ready.

SEO indexed

No Upper Limit

Works for 10⁵⁰ and beyond. O(1) memory — no sieve, no precomputation.

BigInt powered
🌐

Range Finder

All primes between any two numbers. Async — UI never freezes. CSV export.

With CSV export
🔒

Zero Server Calls

All computation in your browser. Your numbers never leave your device.

Private by design
Origin
The story behind it

On May 28, 2026, Franc Potočnik and Claude (Anthropic) set out to understand prime numbers from absolute first principles — not from textbooks, but from scratch. Starting from a single axiom, in one day they arrived at a working algorithm, a mathematical proof, and a new prime number.

First prime after 10⁵⁰ — discovered May 28, 2026
100000000000000000000000000000000000000000000000151

Verified in 0.573ms  ·  75 candidates checked  ·  © Pi4, d.o.o.

NS = S + 1

Everything started from a single axiom: every number is the successor of the previous. From this one rule, all arithmetic follows — and the search for primes begins.

Division is repeated subtraction

A prime is not a special property — it is the absence of property. The number that no rhythm reaches. This philosophical shift changed the approach entirely.

Gap +6 always dominates

Analyzing gaps between primes to 10 million revealed a structural pattern: +6 always dominates. Reason: 6 = 2×3, the LCM of the first two primes — a mathematical necessity.

452× faster — proven

The method was built step by step, with mathematical proofs at each stage. Verified: 0 errors to 500,000. Deterministic to 3.3×10²⁴. Runs entirely in your browser.

Primes are a chaotic system

After testing every pattern hypothesis, one conclusion emerged: prime gaps have second-order symmetry to 99.9% accuracy. Primes are deterministic but unpredictable — like weather. No formula will ever predict them. And that is not a failure of mathematics. That is its nature.

nextprime.app

The result of one day's journey: the only browser-based prime finder combining unlimited range search, arbitrary precision, and zero server dependency.

For Developers
REST API

Integrate NextPrime into your applications. JSON responses. Free tier available.

GET https://api.nextprime.app/v1/check?n={number}
{
  "n": 999999937,
  "prime": true,
  "time_ms": 0.004
}
GET https://api.nextprime.app/v1/range?from={n}&to={n}
{
  "from": 1000000,
  "to": 1001000,
  "count": 53,
  "primes": [1000003, 1000033, ...],
  "time_ms": 0.8
}

API launching soon. Join the waitlist →