# 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:

This article needs to be tidied.Please fix formatting and $\LaTeX$ errors and inconsistencies. It may also need to be brought up to our standard house style.To discuss this page in more detail, feel free to use the talk page.When this work has been completed, you may remove this instance of `{{Tidy}}` from the code. |

This article, or a section of it, needs explaining.In particular: It might be worth extracting some of the below statements into lemmata, for example: "If $n$ is itself square, then so is $n! \paren {n - 1}!$" and "... Then $n! \paren {n - 1}! b! \paren {b - 1}!$ is square" -- they're really easy to prove, even I can do them :-) but it takes more than a glance to recognise that they are true.You can help $\mathsf{Pr} \infty \mathsf{fWiki}$ by explaining it.To discuss this page in more detail, feel free to use the talk page.When this work has been completed, you may remove this instance of `{{Explain}}` from the code. |

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!$

This needs considerable tedious hard slog to complete it.In particular: The fact that $527$ has no such representation can be verified by a direct (but lengthy) computation.To discuss this page in more detail, feel free to use the talk page.When this work has been completed, you may remove this instance of `{{Finish}}` from the code.If you would welcome a second opinion as to whether your work is correct, add a call to `{{Proofread}}` the page. |

## 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.