*In their frequent shopping sprees Paris and Nicole often have trouble checking the bill. To address their less than impressive numeracy skills they decide to return to school. After a year of maths training the teacher wants to test the class of 25 students and lines them up in a queue such that Paris and Nicole are standing next to each other. The teacher then writes a whole number on the board and the first person in the queue says “That number is divisible by 1.” Then the second person in the queue says “That number is divisible by 2,” and so on till the final student in the queue says “That number is divisible by 25.” After all this the teacher exclaims “Well done! Except for Paris and Nicole everyone made a correct statement.”*

**Find where Paris and Nicole were standing in the queue.**

So, we’re looking for a number that can be divided by all numbers from 1 through 25 EXCEPT two of them, that are also consecutive. The number 1 will divide anything, so, that’s trivial. We can also come up with a number that can be divided by ALL of the numbers by simply taking the product of all of those numbers. This doesn’t quite give us our answer, and it also results a number that is much bigger than we really need since some factors would be repeated. (e.g. any number for which 4 is a factor will also have 2 as a factor, so if we don’t need to include both 4 (i.e. 2 x 2) and 2 as factors. Take this a bit further, you see that by including 16 as a factor (2 x 2 x 2 x 2) we include 2, 4, and 8 as well.)

Let’s create such a product, expressed in a form that is prime-factored, though assuming all of the students’ answers were correct:

```
2: prime
3: prime
4: 2 x 2
5: prime
6: 2 x 3
7: prime
8: 2 x 2 x 2
9: 3 x 3
10: 2 x 5
11: prime
12: 2 x 2 x 3
13: prime
14: 2 x 7
15: 3 x 5
16: 2 x 2 x 2 x 2
17: prime
18: 2 x 3 x 3
19: prime
20: 2 x 2 x 5
21: 3 x 7
22: 2 x 11
23: prime
24: 2 x 2 x 2 x 3
25: 5 x 5
```

Combining these (e.g. the factored forms of 4 and 8 are implicit in the factorised 16) we get

`2 x 2 x 2 x 2 x 3 x 3 x 5 x 5 x 7 x 11 x 13 x 17 x 19 x 23 = 26771144400. `

This number is divisible by all of the numbers from 1 to 25. It should be easy to see that by removing, say, 13, we get a number that is still divisable by all of the other numbers from 1 through 25. (13 x 2, the smallest of the other numbers, equals 26, which falls outside range of factors.) Removing 13 we get

`2 x 2 x 2 x 2 x 3 x 3 x 5 x 5 x 7 x 11 x 17 x 19 x 23 = 2059318800,`

But, we need TWO CONSECUTIVE numbers. Suppose we stick with 13 and try removing 12 as well. But, 12 = 2 x 2 x 3, so, we’d have to either remove both of the 3’s as factors, or at least 3 of the 2’s to have no 12. Suppose we remove both 3’s to give us

`2 x 2 x 2 x 2 x 5 x 5 x 7 x 11 x 17 x 19 x 23`

Now we’d have no 13, no 3, no 6, no 9, no 15 … already we have more than two numbers that don’t divide whatever was written on the board. So, 12 won’t work. How about 14? Same problem. You’d need to remove either all of the 2’s or the 7, but, removing all of the 2’s gets rid of all even numbers as valid factors, and removing the 7 gets rid of 14 and 21 as well. So neither Paris nor Nicole occupy the 13th place in line.

Let’s try 17. Like 13, when you remove this as a factor from the original factorization, above, you get a number that is divisible by all other numbers except for 17. We then need to look at 16 and 18 as possible second candidates. 16 = 2 x 2 x 2 x 2. Take out just one of those 2’s and we can still keep every other product in which 2, 4, or 8 is a factor, so removing just one 2 results in the loss of only 16 as a factor. Looks like Nicole and Paris were the 16th and 17th students in the line. For completeness we can look at 18 and see that it doesn’t work since 18 = 2 x 3 x 3, so we’d need to drop all of the 2’s which means we’d have a product with more than two wrong answers in the list.

So, our answer is

2 x 2 x 2 x 3 x 3 x 5 x 5 x 7 x 11 x 19 x 23 = 787386600.

To see if I got the right answer, I googled the problem and found this site (page 3) with the exact same problem and a solution. They get the same places for Paris and Nicole as I did (16 & 17) but their number (that the teacher wrote on the board) is different: 2362159800. This looks like it’s about 3 times what my answer is, and in fact it is exactly 3 times my answer. In other words, they have an extra “3” in their factorization, for whatever reason. So, both answers are correct, but mine is the SMALLEST number that is a factor of all numbers from 1 through 25 excepting 16 and 17.