freeCodeCamp/guide/chinese/mathematics/factorials/index.md

47 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Factorials
localeTitle: 阶乘
---
## 阶乘
### 因子的定义
阶乘是将它乘以每个intiger低于结束为1的intiger。如果初始数字为负则结果为无穷大。
因子n是非负整数定义如下
N = 1 \* 2 \* ... \*n - 1\* n
当n = 0时出现特殊情况。即0 = 1 。
### 因子的便利性
上面的定义为您提供了某些计算的便利。例如,分数内的阶乘通常可以简化如下:
例1 7 / 5 =1 \* 2 \* 3 \* 4 \* 5 \* 6 \* 7/1 \* 2 \* 3 \* 4 \* 5= 6 \* 7 = 42
例2 n + 1 / n =1 \* 2 \* ... \* n \*n + 1/1 \* 2 \* ... \* n= n + 1
### 替代定义
或者,阶乘可以定义如下:
0 = 1
N = n \*n - 1如果n> 0
这种递归定义意味着与传统定义完全相同。将其应用于上面的第二个例子,我们得到:
n + 1 / n =n + 1\* n / n = n + 1
### 旁白:扩展到非整数
请注意上面定义的阶乘仅适用于非负整数。实际上有一个阶乘的推广也延伸到非整数即Gamma函数。特别是对于任何自然数n 你有n = Gamman + 1= n \* Gamman
有关更多信息,请参阅[将factorial扩展为参数的非整数值](https://en.wikipedia.org/wiki/Factorial#Extension_of_factorial_to_non-integer_values_of_argument) 。
一个棘手的例子很多人可能不知道0 = 1.如需进一步证明,请参阅更多信息下的链接。
#### 更多信息:
[阶乘](http://www.purplemath.com/modules/factorial.htm)