i don't understand how prime number works
Youre welcome to read nice wiki page about them: http://en.wikipedia.org/wiki/Prime_number Or to make long story short: number is prime - if it is an integer that have only 2 natural dividers(one and itself)
A prime number is a number that is only divisible by the integer 1 and the number itself. Example: 2 is a prime number because 2 is divisible by 1 and 2. Same for 3. 4, however, is divisible by 1, 2, and 4, and therefore is not a prime number. Owlk has the wiki link, thank you to her. Any questions, please feel free to ask!
Those are all good answers
As a side note, I'd like to add that there are an infinite number of prime numbers. You can never find the last one, because there isn't a last one. Euclid proved this a long time ago. Take any finite list of prime numbers p1, p2, ..., pn. It will be shown that at least one additional prime number not in this list exists. Let P be the product of all the prime numbers in the list: P = p1p2...pn. Let q = P + 1. Then, q is either prime or not: If q is prime then there is at least one more prime than is listed. If q is not prime then some prime factor p divides q. If this factor p were on our list, then it would divide P (since P is the product of every number on the list); but as we know, p divides P + 1 = q. If p divides P and q then p would have to divide the difference of the two numbers, which is (P + 1) − P or just 1. But no prime number divides 1 so there would be a contradiction, and therefore p cannot be on the list. This means at least one more prime number exists beyond those in the list. This proves that for every finite list of prime numbers, there is a prime number not on the list. Therefore there must be infinitely many prime numbers.
Join our real-time social learning platform and learn together with your friends!