Hacker News new | ask | show | jobs
by Someone 2974 days ago
I agree this approach is unlikely to be fruitful. I think the author doesn’t realize how frequent primes are (for example, primes are a lot denser than square numbers).

If you do the minimal to avoid obvious non-primes, avoiding numbers divisible by 2 or 5, you can expect to find a N-digit prime checking about N random N-digit numbers (1), so finding a 4,000-digit one after experimenting for a while doesn’t indicate ability to find primes.

(1) the density of primes around 10ⁿ is about 1/ln(10ⁿ), so you expect to find a prime after ln(10ⁿ) random samples, and

  ln(10ⁿ) = n * ln(10) ≈ 2.3 * n
Avoiding even numbers and multiples of five gives you back a factor of 2.5, more than offsetting that factor of ln(10)
1 comments

The author is 16 and does not ask for quarter. This post is not going to set the world on light but it is a damn good effort.

"If you do the minimal to avoid obvious non-primes" - I take it that is the prompt for "I'm having a laugh" (rofl, lol etc)