this post was submitted on 22 Jan 2024
482 points (98.6% liked)
Science Memes
10885 readers
3914 users here now
Welcome to c/science_memes @ Mander.xyz!
A place for majestic STEMLORD peacocking, as well as memes about the realities of working in a lab.
Rules
- Don't throw mud. Behave like an intellectual and remember the human.
- Keep it rooted (on topic).
- No spam.
- Infographics welcome, get schooled.
This is a science community. We use the Dawkins definition of meme.
Research Committee
Other Mander Communities
Science and Research
Biology and Life Sciences
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- !reptiles and [email protected]
Physical Sciences
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
Humanities and Social Sciences
Practical and Applied Sciences
- !exercise-and [email protected]
- [email protected]
- !self [email protected]
- [email protected]
- [email protected]
- [email protected]
Memes
Miscellaneous
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
How many primes are there before 1 and 2^31. IIRC prime numbers get more and more rare as the number increases. I wouldn't be surprised if this would pass 99% of tests if tested with all positive 32 bit integers.
Per the prime number theorem, for large enough N the proportion of primes less than or equal to N is approximately 1/log(N). For N = 2^(31) that's ~0.0465. To get under 1% you'd need N ~ 2^(145).
So you better use 128-bit unsigned integers 😅
Wolfram alpha says it's about 4.9%. So 4.9% of numbers in the range 1 to 2^31 are prime. It's more than I expected.