mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Math (https://www.mersenneforum.org/forumdisplay.php?f=8)
-   -   Percent chance of being prime (https://www.mersenneforum.org/showthread.php?t=9576)

henryzz 2007-11-08 10:05

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

xilman 2007-11-08 12:08

[QUOTE=henryzz;118034]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[/QUOTE]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

henryzz 2007-11-08 13:16

what i meant was:
how can i work out what percentage of numbers are prime between 2 squares of primes

R.D. Silverman 2007-11-08 13:31

[QUOTE=henryzz;118044]what i meant was:
how can i work out what percentage of numbers are prime between 2 squares of primes[/QUOTE]

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?????

Fusion_power 2007-11-08 14:11

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

Flatlander 2007-11-08 14:39

[quote=Fusion_power;118047]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[/quote]
Yes, this is how things work. The wave function collapses when LLR reaches 100%. :smile:

Spherical Cow 2007-11-08 20:01

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

jasong 2007-11-08 22:55

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.

xilman 2007-11-09 12:59

[QUOTE=jasong;118086]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.[/QUOTE]Fine by me.

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

Paul

Zeta-Flux 2007-11-09 20:55

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.

henryzz 2007-11-10 10:04

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


All times are UTC. The time now is 09:59.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.