31 students in a row were numbered 1,2,...,31 in order.
The teacher wrote down a number on the blackboard.
Student 1 said "the number is divisible by 1",
Student 2 said "the number is divisible by 2",
and so forth...until
Student 31 said "the number is divisible by 31".

The teacher remarked: "Very well class, but two of you gave a wrong statement, and those two sit beside each other".
Determine those two numbers.




Solution to the Problem:


The two numbers are 16 and 17.

You can eliminate numbers 1 through 15:
If a number were not divisible by 15, it would also not be divisible by 30, but they are not next to each other.
Similarly, if a number were not divisible by 14, it would also not be divisible by 28.
This thinking works all the way down to one

You can eliminate 18 because 18 = 2 * 9, and since it is divisible by 2 and by 9, it must be divisible by 18.
You can eliminate 20 because 20 = 4 * 5, and since it is divisible by 4 and by 5, it must be divisible by 20.
You can eliminate 21 because 21 = 3 * 7, and since it is divisible by 3 and by 7, it must be divisible by 21.
You can eliminate 22 because 22 = 2 * 11, and since it is divisible by 2 and by 11, it must be divisible by 22.
You can eliminate 24 because 24 = 3 * 8, and since it is divisible by 3 and by 8, it must be divisible by 24.
You can eliminate 26 because 26 = 2 * 13, and since it is divisible by 2 and by 13, it must be divisible by 26.
You can eliminate 28 because 28 = 4 * 7, and since it is divisible by 4 and by 7, it must be divisible by 28.
You can eliminate 30 because 30 = 3 * 10, and since it is divisible by 3 and by 10, it must be divisible by 30.
This leaves 16, 17, 19, 23, 25, 27, 29, and 31.

So the only numbers which are adjacent to each other are 16 and 17.



Here is K. Sengupta's solution:

Easy if we use elimination (it helps to list down the numbers and cancel as we go along).
The number is even for obvious reason, so cancel 1 and 2.

If the number is not divisible by any odd n>1, then it is not divisible by 2n. but n and 2n is not beside each other, so we may cancel n and 2n for n=3,5,7,9,11,13,15.

By further elimination of number with no possible neighbor, we cancel 4,8,12,31.

Also, divisible by 4,5 => divisible by 20 divisible by 3,8 => divisible by 24 divisible by 4,7 => divisible by 28.

Then we can cancel 20,24,28 which in turn cancels 19,21,23,25,27,29.

That leaves only the pair (16,17), which is the answer if we can verify the existence of a number which satisfies the condition.

However, this is straightforward, any number 8.7.11.13.17.19.23.25.27.29.31k (where k is odd and not divisible by 17) works.



Correctly solved by:

1. Davit Banana Istanbul, Turkey
2. Dr. Hari Kishan D.N. College,
Meerut, Uttar Pradesh, India
3. Ritwik Chaudhuri Santiniketan, West Bengal, India
4. Seth Cohen Concord, New Hampshire
5. Colin (Yowie) Bowey Beechworth, Victoria, Australia
6. Kelly Stubblefield Mobile, Alabama
7. Rob Miles Northbrook, Illinois