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 3rd, 2019, 09:56 AM   #11
Senior Member
 
Joined: Mar 2019
From: iran

Posts: 312
Thanks: 13

for n=100000 p=317 and q=99991 when did we calculate it?
youngmath is offline  
 
April 3rd, 2019, 10:02 AM   #12
Senior Member
 
Joined: Aug 2012

Posts: 2,332
Thanks: 723

Quote:
Originally Posted by youngmath View Post
for n=100000 p=317 and q=99991 when did we calculate it?
How did "we" get enlisted for this project? It's five lines of Python.

Code:
Primes = [101, 103, etc.]  # You fill in the primes you care about.

product = 1
for prime in Primes :
    product *= ((prime - 1)/prime)    
print(str(product))
You initialize a list called Primes with the list of primes, which you can look up or calculate.

ps -- This is Python3, which defines '/' as real number division.

Last edited by Maschke; April 3rd, 2019 at 10:13 AM.
Maschke is offline  
April 11th, 2019, 05:52 AM   #13
Senior Member
 
Joined: Mar 2019
From: iran

Posts: 312
Thanks: 13

proof
1/2 × 2/3 × 4/5 × ... × (p-1)/p = Π (p-1)/p = Π 1-(1/p) = Π 1-p^(-1) = 1/(Π 1/(1-p^(-1))) = 1/zeta(1) = 1/( 1+1/2+1/3+...+1/p) = 1/ln(p)
q=p^2
1/2 × 2/3 × 4/5 × ... × (q-1)/q = 1/ln(q)
=> (p-1)/p × ... × (q-1)/q = 1/ln(q) / 1/ln(p) = 1/ln(p^2) / 1/ln(p) = 1/2
youngmath 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.