Prime numbers are numbers whose only factors are 1 and itself; they are not divisible by any other number. On the other hand, composite numbers have factors other than 1 and itself. For example, 47 is a prime number since there are no numbers other than 1 and 47 which divide it evenly. On the other hand, 51 is a composite number because 3 divides 51 evenly (51 ÷ 3 = 17).
The first ten prime numbers are: 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29. Notice that 1 is considered to be neither prime nor composite. 2 is the only even prime number; all other even numbers are divisible by 2 and so are not prime.
The importance of primes in number theory can be shown by the Fundamental Theorem of Arithmetic, which states that every positive integer can be written as a unique product of prime numbers. For example, 12 = 2 × 2 × 3. This is called a number's prime factorization.
Here is the reason why 1 is not considered to be prime: If 1 were prime, then the Fundamental Theorem of Arithmetic would be false. For example, 12 = 2 × 2 × 3 = 1 × 2 × 2 × 3 = 1 × 1 × 2 × 2 × 3 = ...
Around 300 B.C., Euclid proved (Elements, book IX, proposition 20) that there are an infinite number of prime numbers.
Suppose we have a complete list of all the prime numbers up to a certain prime p. Consider the integer N = (2 × 3 × 5 × ... × p) + 1, which is one greater than the product of all the primes up to p. When N is divided by any prime between 2 and p, it leaves a remainder of 1. Now if N is a prime number, it is a prime greater than p, since N is greater than p. If it isn't a prime number, it may be factored into prime numbers. However, none of its prime factors can be between 2 and p. Either way, there is a prime number greater than p. Therefore, the list of primes never ends.