Multiplication of the numbers $1$ to $n$

2.6k Views Asked by At

Let's say I want to find the product of $1,2,3, \dots, 10$. Do I need to do $1 \cdot 2 \cdot 3 \cdot \dots \cdot 10$ manually or is there an easier way to do it?

Something like the sumation of $1$ to $n$ which gives $\frac{n(n+1)}{2}$.

I tried to search but couldn't find a way to do it directly.

2

There are 2 best solutions below

8
On

It is known as factorial and denoted as $n!$.

The case $10!$ can be reduced:

\begin{eqnarray} 1 \cdot 2 \cdot 3 \cdots \cdot 8 \cdot 9 \cdot 10 &=& 10 \Big(5-4\Big) \Big(5-3\Big) \cdots \Big(5+4\Big)\\ &=& 50 \Big(25-16\Big) \Big(25-9\Big) \Big(25-4\Big) \Big(25-1\Big)\\ &=& 50 \Big(15-6\Big) \Big(15+6\Big) \Big(20-4\Big) \Big(20+4\Big)\\ &=& 50 \Big(225 - 36\Big) \Big(400 - 16\Big)\\ &=& 50 \times 189 \times 384 = 3,628,800 \end{eqnarray}


If you have to do it by head, collect easy factors:

\begin{eqnarray} 1 \cdot 2 \cdot 3 \cdot 4 \cdot 5 \cdot 6 \cdot 7 \cdot 8 \cdot 9 \cdot 10 &=& \Big( 2 \cdot 4 \cdot 5 \cdot 10 \Big) \Big( 3 \cdot 6 \cdot 8 \cdot 9 \Big) \cdot 7\\ &=& 20^2 \cdot 6^4 \cdot 7\\ &=& 400 \times 1296 \times 7 \end{eqnarray}

2
On

The fact that there is a special notation for the factorial suggests that there is no simpler formula for it other than the definition.

Note that there is no special notation for $\sum_{i=1}^n i$, since it can be written as $n(n+1)/2$. (I'm not sure $\binom{n+1}{2}$ counts as special notation in this context.)

If you need a formula, you could use $n! = \Gamma(n+1)$, but using $n!$ is probably much clearer.