For instance, we know that odd numbers behave like:
$$x = 2y + 1 \quad\text{where}\quad x,y\in\mathbb Z$$
For even numbers:
$$a = 2b \quad\text{where}\quad a,b\in\mathbb Z$$
But what about prime numbers?
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityFor instance, we know that odd numbers behave like:
$$x = 2y + 1 \quad\text{where}\quad x,y\in\mathbb Z$$
For even numbers:
$$a = 2b \quad\text{where}\quad a,b\in\mathbb Z$$
But what about prime numbers?
$p \not = ab$ when $a,b > 1 \in \mathbb N$.
Wilson's theorem: a natural number $n > 1$ is a prime number iff $(n-1)!\ \equiv\ -1 \pmod n $
There's no nice, algebraic formula for primes; there are some examples at the Wikipedia article on the subject, but they are all ugly and impractical. Overall, the simplest way to define the primes is as numbers with only 2 divisors.
You can, of course, say things such as "all primes except 2 are odd numbers", which follows from the definition, but this doesn't tell you anything about which odd numbers are prime, and there are not clear patterns.
To add to the fact there is no general formula for primes, it may help to trace back history of prime number. Euclid defined primes in Elements, Book VII, Definition 11 as:
A prime number is that which is measured by a unit alone.
which in turn relies on definitions of number and unit.
Definition 1 from the same book:
A unit is that by virtue of which each of the things that exist is called one.
Definition 2:
A number is a multitude composed of units.
As far as formal definition, Metamath Proof Explorer defines it as such: primes.
As a sidenote, although it is not a property of prime numbers, Goldbach's conjecture states that:
Every even integer greater than 2 can be expressed as the sum of two primes.
Edit: There are forms of primes. Here is the entire list:
Here's another property somewhat related to primes that I studied in the morning:
For any given integer $m$,there is no polynomial $p(x)$ with integer coefficients such that $p(n)$ is prime for all integers $n\ge m$.
References: 1) 104 Number Theory Problems: From the Training of the USA IMO Team
by Titu Andreescu, Dorin Adrica and Zuming Feng.
Edit: I was browsing through the internet when I stumbled upon this book dedicated to primes.(I am unable to comment on it as I have no background in advanced maths)
Since people are talking about "formulas for primes" and someone mentioned polynomials, it's amusing to mention this fact: There actually is a 4th- (if I recall correctly) -degree polynomial in 14 (if I recall correctly) variables, with integer coefficients---let us call it $f(p,x_1,\ldots,x_{13})$---such that $$ p\text{ is prime if and only if }\exists x_1\ \cdots\ \exists x_{13}\ f(p,x_1,\ldots,x_{13})=0. $$ (Or maybe I should have "$14$" where "$13$" appears?)
The polynomial, in all its splendor, is too long to write in this margin. But if you read about Hilbert's 10th problem you'll probably come across it.
Later note: That such a polynomial exists is what is expressed by saying that the set of all prime numbers is a "Diophantine set".
I strongly recommend that you take a look at Zagier's paper on the first 50 million prime numbers to learn about some other characterizations of the notion of "prime number".
As to congruences that characterize primality, Wilson's theorem provides you with one of the most-well known (as the fact that it's already been mentioned above/below testifies). Nonetheless, there is an interesting near-miss by M. V. Subbarao. You can read about this in one of those volumes by Ross Honsberger. Furthermore, if you are curious enough you may want to call on Scott Kominers' homepage: there is a generalization of the said criterion by Subbarao in a note of him that was recently published in Integers.
Here you have some other equivalences of the definition of prime number:
A. $p$ is a positive prime number iff $\phi(p) = p-1$.
When I told Prof. Luca about this finding of mine, he generously told me about Lehmer's totient problem.
B. $p$ is a positive prime number iff $p$ is the least factor $>1$ of some natural number.
C. Later...
$ x= \left\{ \begin{array}{lr} Prime & : \left| \prod _{k=2}^{x-1}\sin \left( {\frac {x\pi }{k}} \right) kx \right| > 0\\ Composite & : \left| \prod _{k=2}^{x-1}\sin \left( {\frac {x\pi }{k}} \right) kx \right| = 0 \end{array} \right. $ s.t. $x \in \mathbb{N}$
This is a function I made, it works like the Sieve of Eratosthenes from which I derived it.
A formula might be created using the$\mod(\cdot)$ function.
$\mod({\rm PrimeNumber}/n) > 0$ for all $n \in \mathbb{N}$ and $n > 1$ other than PrimeNumber
In a way there are more prime numbers than there are a square numbers, this is not an exact statement but the sum over all prime numbers diverges where as the sum over square of all numbers converges.
All the primes are of the form $6k\pm 1,k\in \mathbb{N}$ (but, of course, not all the numbers of this form are prime):
Numbers of the form $6k+2$ or $6k+4$ are even while numbers of the form $6k+3$ are clarly divisible by 3, this leaves only numbers of the form $6k+1$ or $6k+5$ as potential primes
Some elementary primality tests may answer your question regarding the properties of prime numbers. See my question on 'Lehmer-Totient-Problem' for more reference. Also you can use the following theorem as a tool for primality test. The theorem sates that- "An integer $n$ is a prime if and only if $n|\phi(n)!+1$."
Every prime number $p$ can be writen as: $$p=4k\pm1$$
and $$\displaystyle\lim_{n\to\infty} \frac{|\{p\in\mathbb{P}: \exists n\in\mathbb{N}/ p=4n+1\}|}{|\{p\in\mathbb{P}: \exists n\in\mathbb{N}/ p=4n-1\}|}=1$$
where:
It means, there are an equal number of primes of the form $4k+1$ and $4k-1$