Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Which of the following integers is prime: 187, 287, 387, 487, or 587? I can calculate it by hand, but that would take a long time. Is there an easier way? I noticed the numbers only differ 100 from each other, but can I use that fact? Exactly one of these must be prime.

share|cite|improve this question
Is it given that exactly one of these numbers must be prime? – Myself Jan 31 '12 at 11:32
Sorry, forgot that fact, that's true. – Kevin Jan 31 '12 at 11:44
The Divisibility rules will be helpful in this case. – Charles Jan 31 '12 at 12:56
Also, the question is not correct, since two of these numbers are prime ( – Charles Jan 31 '12 at 13:05
up vote 6 down vote accepted

187 is obviously a multiple of 11. 287 is obviously a multiple of 7. 387 is obviously a multiple of 3. So you just have to work on 487 and 587.

share|cite|improve this answer

Also, if a number is not prime, one factor is always less than or equal to the square root of that number

For example, the square root of 487 is a little more than 22. So you need only check the primes below 22 (and you see immediately that 2,3 or 5 doesn't work, so you need only check 5 primes).

share|cite|improve this answer
Moreover, you don't have to try 7, since it divides 287 but not the difference between 487 and 287; for similar reasons, you don't have to check 11 or 17. Adding 13 to 487 gives 500, which is not a multiple of 13, so that's out. 57 is a multiple of 19, but 430 isn't, so 487 isn't. – Gerry Myerson Jan 31 '12 at 12:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.