At a trivia night, the following question was posed: "What is the smallest 5 digit prime?"
Teams (of 4) were given about a minute to write down their answer to the question. Obviously, the answer is googleable, so I'm not asking what the answer to the trivia question is, but rather: how could a team quickly find the answer without previous knowledge of it? If you wanted to try solving the trivia question yourself, don't read any further, as I will start discussing the answer and ruling out other numbers now.
My thoughts so far:
- If you know your slide rules, you expect that prime density is close to $ln(10,000)$ or about 10%. So, a reasonable approach would be to focus on numbers 10,000 through 10,010. Really, what matters is that (I assume) you start at 10,000, factor as many numbers in a row as you can, and then guest the first number you haven't factored.
- We can rule out a lot with easy divisibility tests, leaving 10001, 10003, 10007, and 10009.
- Assuming one of your people is fast with division or knows better divisibility rules, 10003 is also eliminated because it has a small divisor (7). This shouldn't require a special technique.
- We're now left with 3 numbers that reasonable divisibility tests won't handle. It turns out 10,001 is composite, while 10,007 and 10,009 are both prime. But the smaller factor of 10,001 is 73, which is the 21st prime. If the team could do the above steps and then rule out 10,001 by dividing by the first 21 primes (also assuming they know the first 21 primes), they would presumably guess 10,007 thereby being right (though not necessarily confident in their answer).
- But, let's assume that 21 divisions aren't quite possible. Is there a faster way? Let's say that either a test that quickly determines that 10,001 is likely composite or a test that determines that 10,007 is likely prime is sufficient, since we might be down to some guess work at this point, but bonus points if we can know for sure 10,001 is composite or know for sure 10,007 is prime, and extra bonus points if we do both!
- There are potentially approaches that don't rely on ruling out 10,001. For example, I had the idea initially that given that 10,001, 10,007, and 10,009 are each hard to divide, maybe it's fairly likely that 10,007 and 10,009 are twin primes, and therefore it is more likely that 10,007 is a prime than 10,001 and so you would guess it anyway. While 10,007 and 10,009 do turn out to be twin primes, I don't actually think that the assertion holds, and this seems more like luck.
For what it is worth, I just timed myself doing trial division:
$10001=100^2+1$, so I only need to check primes that are 1 mod 4
$10001=10010-9$, so not $7$, $11$, $13$
$10001=10030-29$, so not $17$ or $29$
$10001 = 9990+11$ so not $37$
$41*61 = 2501 = 10001-7500$ so not $41$ or $61$
$10600-10001 = 599$ so not $53$
$10001 +219 = 10220 = 20*511 = 20*7*73$
So $73$ is a factor!
Time: 3 minutes 40 seconds. (Doesn't include going back to reformat the equations.) I might have been able to get under 3 minutes back when I was doing math contests twenty years ago. I doubt there are more than ten people in the country who could do the trial division in under a minute, except by luckily guessing which prime to try. Sasha Schwartz was scary fast in my day, perhaps he could have.
As you can see, part of the way that I do trial division is that I have memorized a lot of nonprimes near multiples of 100: $7 \times 11 \times 13 = 1001$, $17 \times 59 = 1003$, $19 \times 53=1007$, $3 \times 23 \times 29 = 2001$, $31 \times 71 = 2201$, $3^3 \times 37=999$, $41 \times 61 = 2501$, $43 \times 7 = 301$. That covers all the primes up to 43, plus a few more. (Hmm, having written this out, I feel like I should memorize a multiple of $47$, since I already have $53$, $59$, $61$, $71$ and $201 = 3 \times 67$. Maybe I'll try to remember $799=47 \times 17$.)
This suggests to me that some people who are more obsessed than me might have memorized nonprimes near multiples of 1000, and thus might know 10001 = 73*137 by heart.
Other than that, though, I think you have to get lucky to answer this one in a minute.