mersenneforum.org > Math Percent chance of being prime
 Register FAQ Search Today's Posts Mark Forums Read

 2007-11-08, 10:05 #1 henryzz Just call me Henry     "David" Sep 2007 Liverpool (GMT/BST) 595810 Posts Percent chance of being prime is there a way of working out what percent chance a number has of being prime based on the highest prime below its square root less than the square of 3 50% of numbers are prime less than the square of 5 37.5% of numbers are prime that is what i would like be able to work out without actually knowing the figures
2007-11-08, 12:08   #2
xilman
Bamboozled!

"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across

256128 Posts

Quote:
 Originally Posted by henryzz is there a way of working out what percent chance a number has of being prime based on the highest prime below its square root less than the square of 3 50% of numbers are prime less than the square of 5 37.5% of numbers are prime that is what i would like be able to work out without actually knowing the figures
Yes, the chance is either 100% or 0%. A number is either prime or not.

Now, what was the question you really meant to ask?

Paul

 2007-11-08, 13:16 #3 henryzz Just call me Henry     "David" Sep 2007 Liverpool (GMT/BST) 2·32·331 Posts what i meant was: how can i work out what percentage of numbers are prime between 2 squares of primes
2007-11-08, 13:31   #4
R.D. Silverman

Nov 2003

22·5·373 Posts

Quote:
 Originally Posted by henryzz what i meant was: how can i work out what percentage of numbers are prime between 2 squares of primes
Let p1 < p2 be your two primes. The percentage of primes between
p1^2 and p2^2 is trivially [pi(p2^2) - pi(p1^2)]/(p2^2 - p1^2).
pi(N) is the prime counting function.

This is junior high school level math.

WTP?????

 2007-11-08, 14:11 #5 Fusion_power     Aug 2003 Snicker, AL 7·137 Posts Just for Paul, we are going to invent a special kind of prime. We'll call it a Schroedinger prime. We never know if it is prime or not until we ask it. Then it tells us either "I'm prime" or else "I'm composite". But until we ask it, it is a Schroedinger prime and nobody knows if it is alive or dead. Just a little fun on a Thursday morning. DarJones
2007-11-08, 14:39   #6
Flatlander
I quite division it

"Chris"
Feb 2005
England

207710 Posts

Quote:
 Originally Posted by Fusion_power Just for Paul, we are going to invent a special kind of prime. We'll call it a Schroedinger prime. We never know if it is prime or not until we ask it. Then it tells us either "I'm prime" or else "I'm composite". But until we ask it, it is a Schroedinger prime and nobody knows if it is alive or dead. Just a little fun on a Thursday morning. DarJones
Yes, this is how things work. The wave function collapses when LLR reaches 100%.

 2007-11-08, 20:01 #7 Spherical Cow     Nov 2004 22×33×5 Posts I respectfully disagree. I think "primeness" is not subject to the spooky whims of quantum mechanics. I believe a number is prime whether it has been looked at (factored) or not, regardless of the speed or acceleration of the observer relative to the prime. While all else in the universe is at the whim Schroedinger's kitty cat (even existence is not determined until an observer observes), primes are absolute. Primosity is more like the speed of light: absolute, and not subject to the philosophical questions of Schroedinger, Heisenberg, or the old "if a tree falls in the forest when no one is around, does it make a sound?"...recently updated to "if a man makes a statement when there is no woman around to hear it, is he still wrong?" Norm Last fiddled with by Spherical Cow on 2007-11-08 at 20:03 Reason: Had to change the cat's litter box...
 2007-11-08, 22:55 #8 jasong     "Jason Goatcher" Mar 2005 3·7·167 Posts Can't we at least agree that statistics are useful up until the time the status of the number is determined? For example, a lot of people like to sieve enough numbers in a range to give a 90% chance of finding a prime. And when the Prime95 program is run, the sieving and P-1 are run according to statistical probabilities. Until you actually know the status of the number, it seems idiotic and/or conceited to keep shouting,"It's either 100% prime or 100% composite." Sure, that's true, but how many people in the general public are in a situation where that matters. Maybe I should start bringing up the idea of primes with factors that have an imaginary component. In my mind, that's just as relevant.
2007-11-09, 12:59   #9
xilman
Bamboozled!

"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across

2·5,573 Posts

Quote:
 Originally Posted by jasong Maybe I should start bringing up the idea of primes with factors that have an imaginary component. In my mind, that's just as relevant.
Fine by me.

Anyone who doesn't know what we're talking about might find "Gaussian primes" a good starting point.

Paul

 2007-11-09, 20:55 #10 Zeta-Flux     May 2003 30138 Posts henryzz, As Silverman said, if p and q are primes, with p>q, then the percentage of primes between p^2 and q^2 is ( pi(p^2) - pi(q^2) )/ (p^2 - q^2 ) where pi(x) is the prime counting function. If your values for p and q are small, you can just use this formula in a computer to find the exact value. When I read your initial question, I thought you were asking for the percentage of the numbers up to p^2 which are prime. This is pi(p^2)/p^2, which is asymptotic to p^2/ (log(p^2) p^2) = 1/(2 log(p)). This last formula will give you a good rough estimate.
 2007-11-10, 10:04 #11 henryzz Just call me Henry     "David" Sep 2007 Liverpool (GMT/BST) 10111010001102 Posts how without counting the primes can i work this out i want to use this for hopefully having p and q being 100 digit primes how long do u think ( pi(p^2) - pi(q^2) )/ (p^2 - q^2 ) would take if p and q are 100 digit primes is there a quick way

 Similar Threads Thread Thread Starter Forum Replies Last Post houding PrimeNet 1 2014-02-24 20:25 columbus Information & Answers 49 2013-03-07 22:36 dmoran Software 3 2011-06-14 21:21 Mini-Geek Puzzles 29 2009-03-19 22:22 Jack007 Lounge 19 2002-11-17 01:35

All times are UTC. The time now is 22:47.

Thu Jan 27 22:47:59 UTC 2022 up 188 days, 17:16, 2 users, load averages: 1.61, 1.52, 1.47