# Smallest n needing 6 Numbers less than n so that Product of Factorials is Square

## Theorem

Let $n \in \Z_{>0}$ be a positive integer.

Then it is possible to choose at most $6$ positive integers less than $n$ such that the product of their factorials is square.

The smallest $n$ that actually requires $6$ numbers to be chosen is $527$.

## Proof

Obviously the product cannot be a square if $n$ is a prime.

For $n$ composite, we can write:

- $n = a b$

where $a, b \in \Z_{>1}$.

Then:

\(\ds \) | \(\) | \(\ds n! \paren {n - 1}! \paren {a!} \paren {a - 1}! \paren {b!} \paren {b - 1}!\) | ||||||||||||

\(\ds \) | \(=\) | \(\ds n a b \paren {\paren {n - 1}! \paren {a - 1}! \paren {b - 1}!}^2\) | ||||||||||||

\(\ds \) | \(=\) | \(\ds \paren {n! \paren {a - 1}! \paren {b - 1}!}^2\) |

which is a square.

Hence no more than $6$ factorials is required.

To show that $527$ is the smallest that actually requires $6$, observe that:

If $n$ is itself square, then so is $n! \paren {n - 1}!$.

If $n$ is not square-free, write $n = a^2 b$, where $b$ is square-free.

Then $n! \paren {n - 1}! b! \paren {b - 1}!$ is square.

If $n$ is divisible by $2$, write $n = 2 m$.

Then $\paren {2 m}! \paren {2 m - 1}! \paren {m!} \paren {m - 1}! \paren {2!}$ is square.

If $n$ is divisible by $3$, write $n = 3 m$.

Then $\paren {3 m}! \paren {3 m - 1}! \paren {2 m}! \paren {2 m - 1}! \paren {3!}$ is square.

If $n$ is divisible by $5$, write $n = 5 m$.

Then $\paren {5 m}! \paren {5 m - 1}! \paren {m!} \paren {m - 1}! \paren {6!}$ is square.

If $n$ is divisible by $7$, write $n = 7 m$.

Then $\paren {7 m}! \paren {7 m - 1}! \paren {5 m}! \paren {5 m - 1}! \paren {7!}$ is square.

If $n$ is divisible by $11$, write $n = 11 m$.

Then $\paren {11 m}! \paren {11 m - 1}! \paren {7 m}! \paren {7 m - 1}! \paren {11!}$ is square.

The remaining numbers less than $527$ that are not of the above forms are:

- $221, 247, 299, 323, 377, 391, 403, 437, 481, 493$

Each of the following is a product of $5$ factorials which is square:

- $221! \, 220! \, 18! \, 11! \, 7!$
- $247! \, 246! \, 187! \, 186! \, 20!$
- $299! \, 298! \, 27! \, 22!$
- $323! \, 322! \, 20! \, 14! \, 6!$
- $377! \, 376! \, 29! \, 23! \, 10!$
- $391! \, 389! \, 24! \, 21! \, 17!$
- $403! \, 402! \, 33! \, 30! \, 14!$
- $437! \, 436! \, 51! \, 49! \, 28!$
- $481! \, 479! \, 38! \, 33! \, 22!$
- $493! \, 491! \, 205! \, 202! \, 7!$

## Sources

- 1976: P. Erdos and R.L. Graham:
*On Products of Factorials*(*Bulletin of the Institute of Mathematics Academia Sinica***Vol. 4**,*no. 2*)

- 1983: François Le Lionnais and Jean Brette:
*Les Nombres Remarquables*: $527$ - 1986: David Wells:
*Curious and Interesting Numbers*... (previous) ... (next): $527$ - 1994: Richard K. Guy:
*Unsolved Problems in Number Theory*(2nd ed.): $\mathbf {B 23}$: Equal products of factorials.