Yes n=10 but I'm sorry \(\displaystyle (n-1)(n-2)(n-3) = 504\) instead of \(\displaystyle (n-1)(n-2)(n-3) = 405\) it was a fault in writing.
I think there's no cubic equations in our secondary schools, we need to solve the problem without it, I think I found the way.
This's my suggestion:
\(\displaystyle ^nP_r = n(n-1)(n-2)...(n-r+1)\)
and
\(\displaystyle (n-1)(n-2)(n-3) = ^{(n-1)}P_r = 504\)
\(\displaystyle (n-1)-r+1 = n-3 \) the last factor
\(\displaystyle n-n-r=-3\)
\(\displaystyle r=3 \)
so \(\displaystyle ^{(n-1)}P_r = ^{(n-1)}P_3 = 504\)
\(\displaystyle ^{(n-1)}P_3 = ^9P_3 = 504\)
so \(\displaystyle n-1 = 9\)
\(\displaystyle n = 10\)
\(\displaystyle 504n = \dfrac{n!}{(n - 4)!} = n(n - 1)(n - 2)(n - 3) \implies\)
\(\displaystyle (n - 1)(n^2 - 5n + 6) - 504 = 0 \implies n^3 - 6n^2 + 11n - 510 = 0.\)
There is a formula for solving cubics, but it is ugly.
The integer root theorem says that if that equation has an integer zero, it is an integer factor of 510. And we are only interested in positive zeroes.
\(\displaystyle 510 = 51 * 10 = 1 * 2 * 3 * 5 * 17.\)
Furthermore, we can easily see that n > 2 * 3 = 6 because
\(\displaystyle 6^3 - 6 * 6^2 + 11 * 6 - 510 = 6^3 - 6^3 + 66 - 510 << 0.\) And
\(\displaystyle (17^3 - 6 * 17^2 + 17 * 11 - 510 = 4913 - 1734 + 187)
- 500 >> 0.\)
Thus, the only candidates left are 10 and 15.
\(\displaystyle 10^3 - 6 * 10^2 + 11 * 10 - 510 = 1000 - 600
+ 110 - 510 = 400
+ 110 - 510 = 0.\)
The integer root theorem can let you solve cubics of the form
\(\displaystyle x^3 + bx^2 + cx + d = 0\)
if there is an integer root.
EDIT: Note that the integer root theorem does NOT guarantee that an integer root exists.