def prime_product(n):
# first prime, followed by other prime candidates
number = 3
# the sum of all primes so far, starting with lonesome 2
sum = math.log(2)
while number <= n:
if is_prime(number) == 1:
sum = sum + math.log(number)
number = number + 2
print "Sum of log of primes:", sum
print "n: ", n
print "Ratio of sum to n:", sum/n
I'm sure this is inefficient, but there it is. :-/
no subject
I'm sure this is inefficient, but there it is. :-/