in reply to Re^4: Finding the next larger prime. (conclusions)
in thread Finding the next larger prime.

I have read that there are an infinite number of Ns where N-1 and N+1 are both prime, but I never made the connection between that and this -- till now. Why they couldn't just say that in the first place...

As I said in the original post, this was a half remembered impression I picked up from reading something that I readily admit to not fully understanding. {sigh}

From my perspective, this make the Prime Number Theorum about as useful as knowing that you can cause perl to dump core in 6 characters. It's statable and provably true (so I read), but beyond that it's nothing more than an object of curiosity.

I realise my problem is my own ignorance, but I wish these darn things carried a Management Summary and a ROI value that one could assess before getting drawn in to actually trying to understand them:)


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Hooray!

  • Comment on Re: Re^4: Finding the next larger prime. (conclusions)

Replies are listed 'Best First'.
jweed: Algorithms and such
by jweed (Chaplain) on Oct 31, 2003 at 03:32 UTC

    Unfortunately, you are _technically_ incorrect. The fact that you can always find an N such that N-1 and N+1 are primes has been conjectured, but it has not been proven. Of course, it's a good as true but you can never be sure. Still a good starting place though.

    The algorithm that tye is probably referring to is one which states that you can find an arbitrarily long sequence of sequential composite numbers if you look high enough.

    Here it is:
    Let D be the length of the composite run.
    Let us examine the sequence:

    (D+1)!+2,(D+1)!+2,(D+1)!+3,...,(D+1)!+D+1

    Then clearly the first term is divisible by 2 (since the factorial is defined as (1*2*...n)), and by the same logic the second term is divisible by 3, and the 3rd by four. Obviously (from the definition of a factorial), all the terms have a factor greater than 2, and this sequence of D numbers is thus composite. QED.