5 ms·
log(100000) is 5, so approximately 1 in 5 numbers below 100k is prime. Obviously those in the range 10000-99999 are less dense, but primes are still surprisingl
by bidirectional 5y ago
log(100000) is 5, so approximately 1 in 5 numbers below 100k is prime. Obviously those in the range 10000-99999 are less dense, but primes are still surprisingly common.
- madcaptenor 5y agoYou want a natural log there; ln(100000) ~ 11.5. That being said, the pool you're really working from is the numbers with last digit 1, 3, 7, or 9. One out of every 4.6 such numbers under 10^5 is prime. So just guessing until you find a prime is practical.
- 100721 5y agoHi, can you provide some search terms that will help me understand the relationship between ln and prime density?
- sebzim4500 5y agohttps://en.wikipedia.org/wiki/Prime_number_theorem https://en.wikipedia.org/wiki/Prime_number_theorem
- deleted 5y ago[deleted]
- knuthsat 5y agoOr https://en.wikipedia.org/wiki/Prime-counting_function https://en.wikipedia.org/wiki/Prime-counting_function .
- deleted 5y ago[deleted]
- bidirectional 5y agoAh you're correct. Annoying how Google interprets log(x) as base-10 (but more shame on me for not realising that e^5 is obviously not 100000). In my experience everyone uses log and ln interchangeable outside of lessons at school.
- Eduard 5y agolog(x) historically conventionally defaults to base-10. https://en.m.wikipedia.org/wiki/Common_logarithm https://en.m.wikipedia.org/wiki/Common_logarithm
- bidirectional 5y agoAs the wiki page itself notes though: > On calculators, it is printed as "log", but mathematicians usually mean natural logarithm (logarithm with base e ≈ 2.71828) rather than common logarithm when they write "log".
- lupire 5y agoAnd you can knock out multiples of 3 by adding digits.
- madcaptenor 5y agoSure, but that's a little more work than just looking at the last digit, so it's debatable whether it's worth the trouble.
- iso1631 5y agoLooks like there's 8,363 5 digit primes, from 10007 to 99991, so about 1 in 11
- jameshart 5y agoWhy isn’t 00002 your lower bound?
- chockablock 5y agoThe game does not accept leading zeros (00017: "Not a 5 digit prime")