is there any theory to govern the occurrence of prime numbers ? I mean when will next prime occur, any function that gives all primes ??

Look up the Riemann Hypothesis on wikipedia ( http://en.wikipedia.org/wiki/Riemann_hypothesis). Mathematicians have been wondering this for well over a century, but no one has come up with an answer yet.

http://en.wikipedia.org/wiki/Riemann_hypothesis Sorry, here's a link that works.

oh heck no. if there was, then your atm card would not work.

Legendre's constant is a very interesting statement about the primes.

the basic "prime number theorem" says that the number of primes less than n is about \[\frac{n}{\ln(n)}\]

There might be some weird functions about that only give primes, not all of them though...

Join our real-time social learning platform and learn together with your friends!