For any of you that don't know what a factorial is, here's a start:
$x! = x ×(x-1) ×(x-2) ×... 2 × 1$
So $6!$ would be $6 ×5 ×4 ×3 ×2 ×1$
Now onwards to my question.
If $x$ is in the range $12 >= x >= 48$, How many $x$ values there are such that $(x-1)!$ is not divisible by $x$?
I considered listing out all the numbers but I suspect there is a rule here, is there?
Thanks!
$$n\nmid (n-1)!\iff n=4\lor n\text{ is prime} $$
Proof: A prime divding a product divides one of the factors. Thus if $n$ is prime and $n\mid (n-1)!$, then $n$ must divide one of the factors $1,2,\ldots, n-1$, which is not the case already because these factors are too small. We observe that $4\nmid 3!=6$ and $1\mid 0!=1$. Remains the case of $n$ composite and $>4$, so $n $can be written as $n=ab$ with integers $1<a,b<n$. If $a\ne b$, then clearly, $a$ and $b$ appear among the factors $1,2,\ldots, n-1$ in the definition of $(n-1)!$, so $ab\mid (n-1)!$. If $a=b$ then (as $n>4$) $n=ab>2a$ so that $a$ and $2a$ appear among the factors $1,2,\ldots, n-1$, so $n=ab\mid (2\cdot 2a)\mid (n-1)!$.