20210216, 08:54  #1 
Aug 2020
79*6581e4;3*2539e3
755_{8} Posts 
Number of primes 2^n1 within certain range of n
I wanted to calculate how many primes of the form 2^n  1 can be exptected within a certain range of n based purely on the prime number theorem x/ln(x), no special considerations such as n has to be prime.
Expected number of primes smaller than 2^n  1 is roughly or . But we are not looking at all numbers smaller than 2^n  1, but only at n of them. So the fraction of numbers we consider would be . Now to my understanding multiplying these two values should yield the expected number of primes of form 2^n  1, and obviously the multiplication results in a constant: 1.4427. Is that really the correct answer? I don't think so, but can't figure out where I'm wrong. 
20210216, 08:59  #2 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
2^{5}·3·101 Posts 
See LenstraPomerance conjecture in https://primes.utm.edu/notes/faq/NextMersenne.html or Wiki

20210216, 09:03  #3 
Aug 2020
79*6581e4;3*2539e3
17·29 Posts 
Thanks, I read that article before and it seems to deal specifically with Mersenne primes.
I am more generally interested in the number of primes. I just chose the Mersenne form because it's so simple. My question applies also to k * 2^n  1. I'd run into the same problem of ending up with a constant. 
20210216, 09:17  #4 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
2^{5}×3×101 Posts 
You ask one question, and then you ask a different question.
For you question about k * 2^n  1, obviously depends on k. There exist some k values for which the answer is a constant. (zero!) 
20210216, 10:23  #5  
Aug 2020
79*6581e4;3*2539e3
17×29 Posts 
I guess I didn't make clear what my issue is.
As I wrote, I am not looking for special treatment of Sierpinski or Mersenne. I am looking at a general question involving only the Prime Number Theorem: Quote:
Thus, it shouldn't matter if we consider 3 * 2^n + 1 or 2^n  1. Under these circumstances, we should have 2^n/ln(2^n) primes, but we only look at a fraction of these, i.e. n/2^n. And I end up with n/2^n * 2^n/ln(2^n) = 1.4221 which would mean we have a constant expected number of primes which seems strange to me. Hence my question where I made a mistake. Last fiddled with by bur on 20210216 at 10:24 

20210217, 00:21  #6 
Jan 2021
California
462_{8} Posts 
You are not selecting n "random" numbers below 2^n with an even distribution. If you were, then the constant you are coming up with would be about right. Instead you are selecting a distribution that's very biased toward the low end (where primes are denser).
Last fiddled with by slandrum on 20210217 at 00:27 
20210217, 00:42  #7  
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
2^{5}×3×101 Posts 
Here it is:
Quote:
1. I want to find the density of primes of kind k * n with k=4 (for example), "... based purely on the prime number theorem x/ln(x), no special considerations" 2. I expect ....<blah>.... but in reality it is simply 0. 3. Where is my mistake? And the answer is (just like the previous speaker said): "You are not selecting "random" numbers". so PNT is either grossly violated (and you can no longer use it), or (if you use some other forms) somewhat mildly (or strongly) violated (and you can no longer use it "correctly"). 

20210217, 01:46  #8  
Romulan Interpreter
"name field"
Jun 2011
Thailand
2·11·449 Posts 
Quote:
Last fiddled with by LaurV on 20210217 at 01:47 

20210218, 20:54  #9 
"William"
May 2003
New Haven
941_{16} Posts 
This might be what you want:
The expected number of primes between 10^{a} and 10^{b} is ln( a/b ). Also true when replacing "10" with any other base. Now offline, but the wayback machine shows this covered as part of Question #30. 
Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
quadruplets (so:twin primes) analysis every exponantial range  hal1se  Miscellaneous Math  1  20180727 08:12 
sr2sieve number of candidates in range  pepi37  Software  6  20130514 15:11 
Program  primes between number/range  Unregistered  Software  2  20060822 22:54 
Largest range between primes?  Unregistered  Math  10  20060821 19:54 
Twin primes in the 50,000 digit range?  Joshua2  Math  15  20050611 18:46 