The Prime Hunt
How we start at your number and step forward (odd numbers only) until we find the first prime — yours.
We have your seed: the big 128-bit number that came from your name. Now we go hunting for the first prime that appears at or after that spot on the number line.
How the hunt works
- We start at your seed. If it’s even (it usually isn’t, because we made sure the seed is odd), we add 1 so we’re on an odd number.
- Then we take steps of 2: we only look at odd numbers. Why? Because the only even prime is 2; every other prime is odd. So we skip all the evens and test each odd number: is it prime?
- We use a fast test (Miller–Rabin) to decide. If the number passes, we stop — that’s your prime. If it fails, we add 2 and try the next odd number.
So we’re literally walking along the number line: seed, seed+2, seed+4, … until we hit the first prime. That prime is the one we assign to you.
What if we run out of room?
Our numbers live in a 128-bit box. If we ever walked so far forward that we’d go past the biggest 128-bit number, we don’t give up. We turn around and search backward from your seed instead: seed, seed−2, seed−4, … until we find a prime. So there’s always a prime for you.
That’s possible because mathematicians like Euclid proved long ago that there are infinitely many primes. We’ll never run out; we just might have to look in the other direction sometimes.
So: one name → one seed → one prime. The hunt is the step that gets you from the seed to the number that’s officially yours.