Sunday, April 20, 2014

Probability of Being Prime

With prime number it is very easy to get caught up with to much algebra and complex numbers.    A very basic simplification is to realize that prime numbers that occurred become factors to exclude many numbers as possible candidate as prime numbers.  2 for example reduces all likely prime numbers to be odd only. So, walking along odd number line \(n\) is replaced with \(2n+1\).

odd  \(3n\) becomes \(6n+3\)   with 2 odd numbers between consecutive odd multiples of 3
odd  \(5n\) becomes \(10n+5\) with 4 odd numbers between consecutive odd multiples of 5
odd  \(7n\) becomes \(14n+7\) with 6 odd numbers between consecutive odd multiples of 7
odd \(11n\) becomes \(22n+11\) with 10 odd numbers between consecutive odd multiples of 11

So, given a odd number \({N}_{x}\) just  greater that 11, the next lower prime.  We have,

  2/3  =  probability that \({N}_{x}\) is not a multiple of  3
  4/5  =  probability that \({N}_{x}\) is not a multiple of  5
  6/7  =  probability that \({N}_{x}\) is not a multiple of  7
10/11 = probability that \({N}_{x}\) is not a multiple of 11

and so the probability that \({N}_{x}\) is a prime is

\(\prod _{ i }^{ { P }_{ N }<{ N }_{ x }<{ P }_{ N+1 } }{    \frac { { P }_{ i }-1 }{ { P }_{ i } }  } \) when \({ P }_{ N }={ N }_{ x }\) the associated probability is 1.

In general, any number being prime is given by the above expression where \(i=1\), \({P}_{1}=2 \) is the first prime.

What is really interesting is as \({ N }_{ x }\rightarrow \infty \)

\({ \prod _{ 1 }^{ { N }_{ x }\rightarrow \infty  }{ (\frac { 1 }{ 2 } )(\frac { 2 }{ 3 } )(\frac { 4 }{ 5 } )(\frac { 6 }{ 7 } )...\quad ({ P }_{ i }<1)... }  }=0\).

That is to say, given any number, big enough, it is not likely to be a prime number.  For example, any number \(99991<{N}_{x}<100003\) has the  probability of 0.048752917851015 of being a prime.  And any number \(821603<{N}_{x}<821641\) has the  probability of 0.0412229294373678 of being a prime.  Not bad 4% chance.  This probability deceases as \({N}_{x}\) increases.  Infinity is not likely a prime.