# Find $n$, where its factorial is a product of factorials

I need to solve $3! \cdot 5! \cdot 7! = n!$ for $n$.

I have tried simplifying as follows:

$$\begin{array}{} 3! \cdot 5 \cdot 4 \cdot 3! \cdot 7 \cdot 6 \cdot 5 \cdot 4 \cdot 3! &= n! \\ (3!)^3 \cdot 5^2 \cdot 4^2 \cdot 7 \cdot 6 &= n! \\ 6^3 \cdot 5^2 \cdot 4^2 \cdot 7 \cdot 6 &= n! \\ 6^4 \cdot 5^2 \cdot 4^2 \cdot 7 &= n! \\ \end{array}$$

I really didn't see this helping me.

I then tried $6 \cdot 6 \cdot 6 \cdot 6 \cdot 25 \cdot 16 \cdot 7$, but $25$ only has $5$ as a double factor.

Any ideas?

• Change the title? – NoChance Sep 18 '15 at 4:45
• $3!*5!*7!=6!*7!=10!$... – DVD Sep 24 '15 at 3:53

We have

$$3!\cdot 5!\cdot 7!=(1\cdot 2\cdot 3)\cdot (1 \cdot 2\cdot 3\cdot 4\cdot 5)\cdot 1\cdot 2\cdot 3\cdot 4\cdot 5\cdot 6\cdot 7,$$

and combining some of those gives

$$1\cdot 2\cdot 3\cdot 4\cdot 5\cdot 6\cdot 7\cdot \underbrace{(2\cdot 4)}_8\cdot \underbrace{(3\cdot 3)}_9\cdot \underbrace{(2\cdot 5)}_{10}=10!$$

• That is elegantly presented. – josh314 Sep 18 '15 at 4:25

If the formula is true it can only possibly be $8!$, $9!$, or $10!$ because $11!$ and larger have a factor of $11$. $8!$ doesn't have a large enough power of $3$, and $9!$ doesn't have a large enough power of $5$, so if the formula holds it must be $10!$.

• I like this argument -- it avoids actual multiplication completely. But it ends up "necessary" and not "sufficient" (don't know if I'm using those words correctly) - you still have to multiply to verify the equality. – Ross Presser Sep 18 '15 at 5:59
• @RossPresser Once you know $n$, the verification here ends up being quite simple: $3!5!7! = 10!$ iff $3!5! = 8 \cdot 9 \cdot 10$ iff $6 \cdot 120 = 72 \cdot 10$, which is the case. (In fact, this "verification" approach is reasonable even without knowing $n$ in advance; see A. Blass' response.) – Benjamin Dickman Sep 18 '15 at 7:58
• @Ross I never actually did the computation. I figured if we were willing to assume the equation is correct this is sufficient. – Matt Samuel Sep 18 '15 at 11:52
• If the formula is true it can only be $10!$ because $5!$ has a factor of $5$. – N. S. Sep 18 '15 at 15:49
• @N.S: that's a good tweak. Figuring out that "$8!$ doesn't have a large enough power of $3$" as Matt says, requires being able to count past 2. Effort. So I'm much more comfortable observing that neither $8!$ nor $9!$ has a large enough power of $5$ – Steve Jessop Sep 18 '15 at 22:51

You already have some clever answers; here's less clever approach. You want $$3!\cdot5!\cdot7!=n!=7!\cdot8\cdot9\cdots\cdot n,$$ so, cancelling 7! and computing that $3!\cdot 5!=6\cdot120=720$, you want $$720=8\cdot9\cdots\cdot n.$$ Now start dividing both sides by 8, then 9, etc. until you get the answer. Dividing by 8 gives you $90=9\cdots n$, and then you either see the answer already or divide both sides by 9 to get the result.

• This is quite possibly what Samir Khan actually did, except that he expressed $3!5!$ as a product rather than multiplying it out to $720$. Then pulling out a $2$ and a $4$ to the front is like dividing by $8$. – Steve Jessop Sep 18 '15 at 12:06
• There are at least two other answers (aside from Samir's and this) that factor out an 8, then a 9. These are all useful answers in their own ways, because each shows a different level of sophistication you can bring to the problem. And this one in particular is very straightforward after the initial insight. – David K Sep 18 '15 at 13:38

\begin{align} 3! \cdot 5! \cdot 7! &= 6 \cdot 120 \cdot 7! \\ &= 6 \cdot 15 \cdot 8! \\ &= 2 \cdot 5 \cdot 9! \\ &= 10 \cdot 9! \\ &= 10! \end{align}

• Are there other examples of a product of 3 or more factorials (each greater than 1) equalling a factorial? – DanielWainfleet Sep 19 '15 at 6:17
• many: for example take the product of two factorials: n = p! q!, then (n-1) ! p ! q ! = n ! – aka.nice Sep 20 '15 at 22:08

It should work if we start factoring consecutive integers out of the expression. You have it boiled down to this $$6 \cdot 6^3\cdot5^2 \cdot 4^2 \cdot 7 =$$ $$2\cdot 3 \cdot (6^3 \cdot 5^2 \cdot 4^2 \cdot 7)=2 \cdot 3 \cdot 4\cdot 5\cdot 6\cdot 7\cdot (6^2 \cdot 5\cdot 4)$$ This is a good start, but now we need an 8. we get an 8 by using our 4 and a factor of 2 from one of our 6s. This yields: $$2\cdot3\cdot4\cdot5\cdot6\cdot7\cdot8\cdot(3\cdot6\cdot5)$$ We can get a 9 by using our 3 and a factor of 3 from our remaining 6. What remains:$$2\cdot3\cdot4\cdot5\cdot6\cdot7\cdot8\cdot9\cdot(2\cdot5)=10!$$ How about that?

Notice, $\color{red}{3}$, $\color{red}{5}$, $\color{red}{7}$ are prime numbers (can't be factorized), then the factorials can be successively reduced as follows $$3!5!7!=(3\cdot 2!)\cdot (5\cdot 4!)\cdot (7\cdot 6!)$$ $$=\color{red}{3}\cdot \color{red}{5}\cdot \color{red}{7}\cdot (2!)\cdot (4!)\cdot (6!)$$ $$=\color{red}{3}\cdot \color{red}{5}\cdot \color{red}{7}\cdot (2\cdot 1)\cdot (4\cdot 3!)\cdot (6\cdot 5!)$$ $$=1\cdot 2\cdot \color{red}{3}\cdot4\cdot \color{red}{5}\cdot 6\cdot \color{red}{7}\cdot (3! )\cdot (5!)$$

$$=1\cdot 2\cdot 3\cdot4\cdot 5\cdot 6\cdot 7\cdot (3\cdot 2\cdot1 )\cdot (5\cdot 4\cdot 3\cdot 2\cdot 1)$$ $$=1\cdot 2\cdot 3\cdot4\cdot 5\cdot 6\cdot 7\cdot ((2\cdot 4)\cdot(3\cdot 3) \cdot(2\cdot 5) )$$ $$=1\cdot 2\cdot 3\cdot4\cdot 5\cdot 6\cdot 7 \cdot8\cdot9\cdot 10$$$$=10!=n!$$ $$\color{red}{n=10}$$

One can (and possibly should) be even less clever than Andreas proposes. Just compute 3! 5! 7! (getting 3628800) and then use brute force to find a number whose factorial that is. E.g., obviously the number is bigger than 7!, so start with 8! and work upwards. 8! = 40320, too small. 9! = 362880, too small. 10! = 3628800, just right -- and we're done.

If the number were much larger, requiring a search of a larger range of possible n, you could search in a marginally less-brainless way. E.g., find one n that's too small and one that's too large, then repeatedly try one in the middle and halve the range size.

Note that this requires neither intelligence nor good luck, and doesn't really have anything to do with factorials!

• The only problem I have with this answer is "(and possibly should)." Your second paragraph can be turned into a fast algorithm (it's essentially binary search) and is possibly the best way to do it on a computer but then, at least in my opinion, it no longer qualifies as "less clever." Good answer otherwise though. – Matt Samuel Sep 18 '15 at 23:21
• I said "and possibly should" because, as Einstein is alleged to have said, "chalk is cheaper than grey matter" and if there's a stupid way to do something effectively it's often a good choice. Only "possibly", of course, because Andreas's solution is pretty parsimonious with the grey matter too. I agree that once you go from sequential to binary search it's no longer "less clever" -- but it's still less mathematically clever. – Gareth McCaughan Sep 21 '15 at 11:11