Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • by perlmoth (5171) on 2004.07.14 15:20 (#32543)
    What surprises me is how early in the sequence that the answer occurs. I'd have thought that the first 10-digit prime would have occurred in the umpty-thousandth digit in the sequence, but then again my number theory knowledge is quite hopeless.
    Did you realise that the answer was likely to occur within the first 250 digits, or was it a bit of luck?
    • From the prime number theorem, the density of primes around n is 1/log(n) where log is the natural log (which just coincidentally is what Perl uses for a log function). Which means that a random string of 10 digits has about 1 chance in 25 or so of being prime.

      Therefore the odds of finding one in the first 250 digits are pretty good. And if you don't find one there, you can just add digits.

      Incidentally the geeky answer to this question is that the first 10 digit prime in the digits of e is 0000000002.