Thread: Odds of prime discussion View Single Post
 2013-10-06, 02:18 #18 TheCount     Sep 2013 Perth, Au. 11000102 Posts Part of the reason I like prime finding is the fun of learning some new maths and number theory. In the Proth/Riesel probability equation I am working on the weight w was the Nash weight divided by 1751.542 giving a coefficient of 1.00 for the average k of base 2. The trouble with that is it assumes base 2 has the same density of primes as a randomly chosen set of odd numbers of the same magnitude. So I want to find weight of the a randomly chosen set of odd numbers of the same magnitude as k*b^n-1. How to go about that? I tried by finding the weight of the term k*n-1. I could just average sieve runs for the first 100,000 k's but sieve programs don't deal with the term k*n-1. Instead I used Prime Number Theory which says that the chance of a random integer x being prime is about 1/log x For x = k*n-1, chance is about 1/log (k*n-1) To find the probability for a fixed k over a given range we integrate from n = A to n = B. Integrating 1/log (k*n-1) gives li(k*n-1)/k, where li() is the logarithmic integral. So the number of primes, or fraction thereof, expected in a given range n = A to B for k*n-1 is: (li(k*B-1)-li(k*A-1))/k There is a logarithmic integral calculator here: http://keisan.casio.com/exec/system/1180573428 Now I use this for R620, where b=620 and k=20. The Unproven Conjectures table has the P=1e6 weights in the n per 25000 at 1e12 column if you divide by 1.25. For R620 the P=1e6 weight is 1007/1.25=805.6 The weight of the term 20*n-1 is (li(k*B-1)-li(k*A-1))/k = (li(20*110000-1)-li(20*100001-1))/20 = 686.885 So w = 805.6/686.885 = 1.1728 This compares to my old version where the Nash weight was 1855, so w = 1855/1751.542 = 1.0591 So the probability increases from 11.42% to 12.64% using this new w. This is still too low compared to 19.5%. I'll have to keep thinking on it.