My Math Forum  

Go Back   My Math Forum > College Math Forum > Number Theory

Number Theory Number Theory Math Forum


Reply
 
LinkBack Thread Tools Display Modes
April 1st, 2019, 04:53 PM   #1
Senior Member
 
Joined: Mar 2019
From: iran

Posts: 312
Thanks: 13

result of my prime counting function

pi(n) = number of primes less than n
i proved that:
pi(n) - pi(√n) = n × (1/2 × 2/3 × ... × p-1/p)
p = largest prime less than or equal to √n
prime number theorem: pi(n) = n/ln(n)
lim pi(√n) / pi(n) = lim √n/ln(√n) / n/ln(n) = lim 2/√n = 0
=> pi(n) - pi√n ~ pi(n) = n × (1/2 × 2/3 × ... × p-1/p)
p < √n
and
pi(n^2) = n^2 × (1/2 × 2/3 × ... × q-1/q)
q < n
=> pi(n^2)/pi(n) = n × ( p-1/p × ... × q-1/q)
p > √n , q < n
and
pi(n^2)/pi(n) = n^2/ln(n^2) / n/ln(n) = n/2
=> n/2 = n × (p-1/p × ... × q-1/q)
=> lim p-1/p × ... × q-1/q = 1/2
p>√n , q<n
for n=100 it is 0.526 ~ 1/2
for n=1000 it is 0.513 ~ 1/2
youngmath is offline  
 
April 1st, 2019, 06:51 PM   #2
Senior Member
 
Joined: Aug 2012

Posts: 2,332
Thanks: 723

Quote:
Originally Posted by youngmath View Post
pi(n) - pi(√n) = n × (1/2 × 2/3 × ... × p-1/p)
I assume the last factor is $(p-1)/p$.

I calculated $\pi(100,000) - \pi(sqrt(100,000)) = 9527$ and

$\displaystyle 100,000 \times \prod_{p < 316, \\ p \ \text{prime}} \frac{p-1}{p} = 9307.8...$

So there's some drift there. Note that sqrt(100,000) is around 316.

ps -- For n = 1,000,000 and p = 997 I got 78,330 for the left hand side of your equation and 80965.2... for the right side.

I used Wolfram Alpha to calculate the LHS and wrote a little Python program to calculate the RHS. I didn't bother to work out the primes, I just copied them into a list from here.

Can you imagine what Gauss and Euler would have done with tools like these? Probably wasted their lives looking at LOLCats and arguing with circle squarers and angle trisectors.

Last edited by Maschke; April 1st, 2019 at 07:07 PM.
Maschke is offline  
April 2nd, 2019, 12:12 AM   #3
Senior Member
 
Joined: Aug 2012

Posts: 2,332
Thanks: 723

Oh. Correction on the calculation of the RHS for n = 100000. I now get 9651.

Last edited by Maschke; April 2nd, 2019 at 12:16 AM.
Maschke is offline  
April 2nd, 2019, 08:10 AM   #4
Senior Member
 
Joined: Mar 2019
From: iran

Posts: 312
Thanks: 13

can you calculate 100/101 × ... × 9972/9973 ?
youngmath is offline  
April 2nd, 2019, 08:49 AM   #5
Senior Member
 
Joined: Aug 2012

Posts: 2,332
Thanks: 723

Quote:
Originally Posted by youngmath View Post
can you calculate 100/101 × ... × 9972/9973 ?
I get 6,088,469.245583834 including multiplying by n and 0.06088469245583832 without, with n = 100,000,000.

And pi(10,000,000) - pi(1000) = 5,760,226.

https://www.wolframalpha.com/input/?...00)+-+pi(10000)

Last edited by Maschke; April 2nd, 2019 at 08:54 AM.
Maschke is offline  
April 2nd, 2019, 10:37 AM   #6
Senior Member
 
Joined: Mar 2019
From: iran

Posts: 312
Thanks: 13

these fractions start with 100/101 this is about the second theorem
lim (p-1)/p × ... × (q-1)/q = 1/2
√n<p , q<n
for n=10000 p=101 q=9973
100/101 × ... × 9972/9973 = 0/506 ~ 1/2
for n=100 product is 0.526
for n=1000 product is 0.513
and for n=10000 it is 0.506
youngmath is offline  
April 2nd, 2019, 04:00 PM   #7
Senior Member
 
Joined: Aug 2012

Posts: 2,332
Thanks: 723

Quote:
Originally Posted by youngmath View Post
these fractions start with 100/101 this is about the second theorem
lim (p-1)/p × ... × (q-1)/q = 1/2
√n<p , q<n
for n=10000 p=101 q=9973
100/101 × ... × 9972/9973 = 0/506 ~ 1/2

Where does $q$ come from? This is a little confusing. Is this limit taken as both $n$ and $q$ go to infinity independently? Or does it relate to $n$ and $p$? Can you clarify please?

ps -- Oh I see, I didn't understand what you were asking earlier. My post #5 is wrong. Earlier we were calculating 1/2 x 2/3 x 4/5 x ... (p-1)/p and I thought we were still doing that. But now you are multiplying all the values of (p-1)/p for p between two arbitrary primes. Didn't realize that.

My post #2 and the correction in #3 are still correct. And actually the product of (p-1)/p between two primes r and q is just the product from 1 to q divided by the product from 1 to the prime before r. If I'm understanding your latest notation.

Last edited by skipjack; April 2nd, 2019 at 11:27 PM.
Maschke is offline  
April 2nd, 2019, 04:34 PM   #8
Senior Member
 
Joined: Aug 2012

Posts: 2,332
Thanks: 723

Quote:
Originally Posted by youngmath View Post
can you calculate 100/101 × ... × 9972/9973 ?
Ok I calculated this and got 0.5060344379058458.

What is the significance of 101 and 9973? What limit are you taking? Do 101 and 9973 independently go to infinity? How are they chosen?

I know that for n = 10,000, sqrt(10,000) = 100 and so p = 101 is the first prime larger than sqrt(10,000).

I know 9973 is the largest prime less than 10,000.

Ah ... is this starting to make sense? You take the smallest prime larger than sqrt(n) and the largest prime smaller than n ... ok now I get it. So the limit as n goes to infinity should be 1/2.

I wonder if someone can prove this.

Last edited by Maschke; April 2nd, 2019 at 04:39 PM.
Maschke is offline  
April 3rd, 2019, 02:35 AM   #9
Senior Member
 
Joined: Mar 2019
From: iran

Posts: 312
Thanks: 13

can you calculate it for n=100000 and n=1000000
youngmath is offline  
April 3rd, 2019, 08:57 AM   #10
Senior Member
 
Joined: Aug 2012

Posts: 2,332
Thanks: 723

Quote:
Originally Posted by youngmath View Post
can you calculate it for n=100000 and n=1000000
Yes, why? We've already done larger numbers.
Maschke is offline  
Reply

  My Math Forum > College Math Forum > Number Theory

Tags
counting, function, prime, result



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Approximation for the Prime Counting Function numberguru1 Number Theory 3 November 6th, 2015 01:21 PM
A property of the prime counting function. Jonas Castillo T Number Theory 6 May 9th, 2015 06:26 PM
An equation of prime counting function. jim198810 Number Theory 6 March 26th, 2015 07:31 PM
Question on prime counting function \pi fafa Number Theory 24 June 22nd, 2013 12:55 AM
Lower Bound for the Prime Counting Function guynamedluis Number Theory 2 April 21st, 2012 12:48 PM





Copyright © 2019 My Math Forum. All rights reserved.