Subscription

Books
Shop
About

Saturday, August 3, 2013

The difference between two (consecutive) prime numbers

Recall that
The Continuous derivative method of finding a formula for the estimated difference between two prime numbers
Applying the Product Rule for differentiating functions, P'(n) , the derivative of Prime(n),
is ~= α(n.1/n + 1.log n) = α( 1 + log n )
Yes, the derivative is usually for continuous functions, while Prime[n] is discrete, but approximating this way is OK because it's useful. 
What the derivative means is: let Δ be a reasonably small value, then P(n+Δ) ~= P(n) + Δ.P'(n)
This implies that if we want P(n+1), we may put Δ=1 above and the (n+1)th prime number is approximately P(n) + P'(n), i.e. just add α( 1 + log n )  to the nth prime number.
Got it?
The (n+1)th prime number, note α around 1.1
What is this useful for? 
We've already seen that we may estimate the prime numbers with so-so results using the formula for the nth prime.
But we may sometimes get closer approximations when we seek a prime number, the (n+1)th prime for instance, using the difference formula and prior knowledge of the nth prime.   

Examples:
If we know the 99th prime number to be 523, what is the 100th prime?
Add 1.2(1+log99) to 523 , to get 523+6.714 ~= 530.
Oh well, this is not a prime number and it's still pretty far from the 100th prime (541), but the formula works better sometimes,
e.g. the 101st prime, given the 100th prime is 541 is
estimated to be 541+1.2(1+ln100) = 541 + 6.726 ~= 547.7
and in actual fact is 547

The finite/discrete derivation of the formula for the estimated difference between two consecutive primes
This yields similar/close results to the continuous derivative steps above:
P[n+1] - P[n] ~= α.(n+1).log(n+1) - α.n.logn
 = α [ n.log(n+1) + log(n+1) - n.log(n) ] 
 = α [ log ( (n+1)^n ) - log (n^n) + log (n+1) ] 
=  α [ log ( {(n+1) / n}^n . (n+1) ) ]
= α [ log {(1 + 1/n)^n .(n+1)} ] 
and at this point, you need the fact that (1+ 1/n)^n is approximately e, which has log 1, for reasonably large n.  For example (1+1/5)^5 is about 2.5, while 1.01^100 is about 2.7.  Anyway, moving on...
so P[n+1] - P[n] ~= α.log(e.(n+1)) = α.[1+log(n+1)] 

What should be done about the difference between the continuous and the discrete formulae?
Ignore the fact that the difference has 1+log(n+1) here, but 1+log(n) in the first derivation.
We might have even chosen to use the derivative at n+1/2Δ instead of at n as we did, and got the difference P[n+1] - P[n] ~= α.[1+log(n+ 1/2)]   
Anyway, when n>>1, log(n) is very close to log(n+1) in the sense that it's much smaller than 1 and much smaller than n: how to see this is another short exercise in using the derivative :) i.e. the derivative of log(n) is 1/n which is << 1 << n

Answers to two previous questions
 1. How does one know that there is no largest PRIME number?  Because when we think we've found the biggest, here is an estimate for the next one...add 1+log(n+1) to it. 
2. How do you know if α > 1?  Sorry I thought I knew, but I don't (yet.) 

2 comments:

  1. Correction: Obviously meant "Applying the Product Rule..." NOT "Applying the Chain Rule" in the first paragraph.

    ReplyDelete
  2. Comment on "no largest prime number"
    Even the "proof" here is not very good.
    Why do I say this?
    Well, we started with a graph that gave the hint that Prime[n] looks like n log n at least on the range of n that we computed and plotted (probably n from 1 to a few million). We determined the difference or derivative formula based on that. Now we want to assume that this holds for n up to an arbitrarily large value.
    But we have no guarantee that Prime[n] continues to follow the difference formula forever. That said, it would be surprising if the behaviour of Prime[n] suddenly became very different for larger values of n.

    How to repair this situation?
    If only we could show that α has a lower limit, say 1, or even any non-negative value, then we could seal our argument. And we can, I promise. I'll just need a new, so-called analytic proof.

    ReplyDelete

Blog Archive

My Other Blogs

  • I Love Hue - The coloured tile puzzle game 'I Love Hue' is beautiful and truly a joy to love. I've now done 900 puzzle layouts, with 55 to go. Then there is Duolingo ...
    1 day ago
  • land and country - Because we need reminders about the scale of things... pic.twitter.com/ETFAT0Qxjr — Icthyophaga vocifer (@tadepen) November 19, 2024 Population density...
    3 days ago
  • Costume 🌟 Couture - 🌟🐉 Unleash the Dragon (and if it's too hard to walk in those clogs of yours, just fly?) Featured fashion designer = Guo Pei Featured musical artiste ...
    4 days ago
  • Tradition - Music from the play, Fiddler On The Roof and film adaptation, and so on. Want fine African Literature? (Preview) Nigerian Lifestyle A-Z at REALbubbler...
    1 week ago
  • It's time... - but don't go away. Keep up with my other blogs. Read my books. Stay mathy. ✌
    1 year ago

About Me

Followers