# Let `N in ZZ^+` . Minimize `N` , so that 7000 is a factor of `N^3-N`  but 9000 is not. (Israel Mathematical Olympiad, 2020, Q9) It is clear that `N ^ 3 - N = ( N - 1 ) N ( N + 1 ) , ` that is, a product of three consecutive integers. It is required to have factors `2 ^ 3 , ` `5 ^ 3 = 125 ` and `7 ` but not `9.`

Because no more than one of three consecutive integers can be divisible by 5, one of them must be divisible by 125.

The first such number is 125 itself, but 126 is divisible by 9, so we cannot use it; 123 and 124 are not divisible by 7.

The next such number is `2 * 125 = 250 . ` The only number of 248, 249, 250, 251, and 252 that is divisible by 7 is 252, but it is also divisible by 9.

Further, consider `3 * 125 = 375 ` and its neighbors 373, 374, 375, 376, and 377. None of them is divisible by 7.

Further, consider `4 * 125 = 500 ` and its neighbors 498, 499, 500, 501, and 502. None of them is divisible by 7.

Further, consider `5 * 125 = 625 ` and its neighbors 623, 624, 625, 626, and 627. It is 623 that is divisible by 7.

This way, the smallest N is 624, and `N^3 - N = 623 * 624 * 625` satisfies all requirements.

Last Updated by eNotes Editorial on