Hacker News new | ask | show | jobs
by mark-r 3418 days ago
The problem wasn't in proving this particular number was prime, it was finding a large prime number to begin with. I don't know what the state of the art was back in the day, but 32 bits would certainly have been too large for the Sieve of Eratosthenes.
1 comments

No, it wasn’t. ln(2654435761) is about 22, so if you limit yourself to odd numbers, about one in 11 attempts near that number will give you a prime.

At a generous one minute to prove primality of numbers in that range using trial division, and assuming you forget to bail out early when you find the first divisor, you still very likely will find a prime within an hour.

Even in the 70s, when computer time cost real money, that shouldn’t deter you.

(I just tried this on a Mac Mini, in Swift; finding 1000 primes took about a third of a second; 3 seconds if I forget to bail out early)

Edit: as further evidence that this isn't that large a prime: we knew 2^31-1 to be prime by trial division in 1772 (Euler somehow found time to do that)