If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Lesson 2: Prime and composite numbers

# Prime numbers

Prime numbers are numbers that have only 2 factors: 1 and themselves. For example, the first 5 prime numbers are 2, 3, 5, 7, and 11. By contrast, numbers with more than 2 factors are call composite numbers. Created by Sal Khan.

## Want to join the conversation?

• Ate there any easy tricks to find prime numbers?
• If you want an actual equation, the answer to your question is much more complex than the trouble is worth. There's an equation called the Riemann Zeta Function that is defined as The Infinite Series of the summation of 1/(n^s), where "s" is a complex variable (defined as a+bi). When the "a" part, or real part, of "s" is equal to 1/2, there arises a common problem in number theory, called the Riemann Hypothesis, which says that all of the non-trivial zeroes of the function lie on that real line 1/2. The distribution of the values directly relate to the amount of primes that there are beneath the value "n" in the function. This delves into complex analysis, in which there are graphs with four dimensions, where the fourth dimension is represented by the darkness of the color of the 3-D graph at its separate values. Like I said, not a very convenient method, but interesting none-the-less.
• why is 1 not prime?
• In the 19th century some mathematicians did consider 1 to be prime, but mathemeticians have found that it causes many problems in mathematics, if you consider 1 to be prime. The most notable problem is The Fundamental Theorem of Arithmetic, which says any number greater than 1 has a unique prime factorization. e.g. 6= 2* 3, (2 and 3 being prime). But if we let 1 be prime we could write it as 6=1*2*3 or 6= 1*2 *1 *3. There would be an infinite number of ways we could write it. There are other issues, but this is probably the most well known issue.

So 1 is specifically excluded from being prime.
• What is the harm in considering 1 a prime number? It is true that it is divisible by itself and that it is divisible by 1, why is the "exactly 2" rule so important?
• The Fundamental Theorem of Arithmetic states that every number is either prime or is the product of a list of prime numbers, and that list is unique aside from the order the terms appear in. For instance, I might say that 24 = 3 x 2 x 2 x 2 and you might say 24 = 2 x 2 x 3 x 2, but we each came up with three 2's and one 3 and nobody else could do differently. This wouldn't be true if we considered 1 to be a prime number, because then someone else could say 24 = 3 x 2 x 2 x 2 x 1 and someone else could say 24 = 3 x 2 x 2 x 2 x 1 x 1 x 1 x 1 and so on, Sure, we could declare that 1 is a prime and then write an exception into the Fundamental Theorem of Arithmetic, but all in all it's less hassle to just say that 1 is neither prime nor composite.
• Why is 2 considered a prime number?
• As Sal says at , it's a number divisible by only two natural numbers. And two is divisible by only 1 and 2. It does, as he mentions at , break the pattern of all the other primes in being the only even prime number.
• Is pi prime or composite?
• Neither - those terms only apply to integers (whole numbers) and pi is an irrational decimal number.
• Why does a prime number have to be divisible by two natural numbers? Why can't it also be divisible by decimals?
• All numbers are divisible by decimals. For example, you can divide 7 by 2 and get 3.5 . When using prime numbers and composite numbers, stick to whole numbers, because if you are factoring out a number like 9, you wouldn't say its prime factorization is 2 x 4.5, you'd say it was 3 x 3, because there is an endless number of decimals you could use to get a whole number.
• Why is one not a prime number i don't understand?
• I have question for you
Would consider 1 and 1 different numbers?
I wouldn’t. The mathematical community doesn’t either.
So when a number is divisible by itself and one, it’s prime asking the number itself isn’t one
I hope this helps you
• At what does counter intuitive mean ?
• It means that something is opposite of common-sense expectations but still true.Hope that helps! :)