Definition:Prime Number

Definition
A prime number $$p$$ is a positive integer that has exactly two positive divisors.

Those two divisors of $$p$$ are $$1$$ and $$p$$, from Integer Divisor Results:


 * $$1$$ divides all the integers;
 * Every integer divides itself.

The list of primes starts:
 * $$2, 3, 5, 7, 11, 13, 17, \ldots$$

Equivalent Definition
$$p$$ is prime iff $$\tau \left({p}\right) = 2$$, where $$\tau \left({p}\right)$$ is the tau function of $$p$$.

Odd Prime
Every even integer is divisible by $$2$$, which is what "even" means. Therefore, apart from $$2$$ itself, all primes are odd.

So, referring to an odd prime is a convenient way of specifying that a number is prime, but not equal to $$2$$.

Composite
An integer greater than $$1$$ which is not prime is defined as composite.

Extension to Negative Numbers
The concept of primality can be applied to negative numbers by defining a negative prime to be of the form $$-p$$ where $$p$$ is a (positive) prime.

Some more advanced treatments of number theory define a prime as being either positive or negative, by specifying that a prime number is an integer with exactly $$4$$ integer divisors.

See Prime Number has 4 Integral Divisors.

By this definition, a composite number is defined as an integer (positive or negative) which is not prime and not equal to $$\pm 1$$.

There are advantages to this approach, because then special provision does not need to be made for negative integers.

Comment
It follows from this that $$1$$ is not a prime number by this definition, as $$1$$ has only one positive integral factor, that is, $$1$$ itself.

The wording of this definition saves having to make a special case for $$1$$, which (for all sorts of reasons) is not considered to be a prime number.

Some authors use the symbol $$\mathbb{P}$$ to denote the set of all primes. This notation is not standard (but perhaps it ought to be).

The letter $$p$$ is often used to denote a general element of $$\mathbb{P}$$, in the same way that $$n$$ is often used to denote a general element of $$\N$$.