While looking to an italian Q&A site i found this question:
Find the positive integers $0<n<50$ such that $\frac{(n^2-1)!}{(n!)^n}$ is an integer.
The author of the question specified that is taken by some mathematical competition. So i assume that there is a way to found the solutions in an easy way without the use of a calculator.
Given a prime number $p \le n$. The higest power of $p$ that divides $n!$ is given by $\frac{n-\sum_k a_k^{(n)}}{p-1}$, where $a_k^{(n)}$ are the digits of $n$ in base $p$ i.e. $$ n= \sum_k a_k^{(n)} p^k $$ (see e.g this).
Comparing the prime factorization of the two factorials we have that $(n!)^n$ divides $(n^2-1)!$ if and only if, for any $p \le n$ prime $$ 1+\sum_k a_k^{(n^2-1)} \le n \sum_k a_k^{(n)} $$ This makes possible to check if an integer is or not a solution, but checking $50$ numbers with this method doesn't look suitable for a mathematical competition, so i was wondering if there is any faster way to solve this problem.
The solutions should be (checked with Mathematica)
