n!!
给出 n 的双阶乘.
Factorial2 
n!!
给出 n 的双阶乘.
更多信息
- 数学函数,同时适合符号和数值运算.
.- 当 n 为偶数时,n!! 是偶数的乘积,n 为奇数时,为奇数的乘积.
- Factorial2 可求任意数值精度的值.
- Factorial2 自动线性作用于列表.
- Factorial2 可与 Interval 和 CenteredInterval 对象一起使用. »
范例
打开所有单元 关闭所有单元基本范例 (6)
Table[n!!, {n, 10}]50!!(1.5)!!Plot[Factorial2[x], {x, -5, 5}]ComplexPlot3D[Factorial2[z], {z, -2 - 2I, 2 + 2I}, PlotLegends -> Automatic]Series[Factorial2[x], {x, 0, 2}]//FullSimplify在 Infinity 的级数展开:
Series[Factorial2[x], {x, ∞, 2}]//FullSimplify//Normal范围 (31)
数值计算 (6)
Factorial2[4]Factorial2[27]N[Factorial2[3 / 13], 10]Factorial2[5.211111111111111111]Factorial2[2. + I]Factorial2[13`100]//TimingFactorial2[45`1000];//Timing用 Interval 和 CenteredInterval 对象计算最坏情况下的区间:
Factorial2[Interval[{2.1, 2.2}]]Factorial2[CenteredInterval[3, 1 / 100]]或者用 Around 计算普通的统计区间:
Factorial2[Around[2, 0.01]]Factorial2[{{1, 2}, {3, 4}}]或者用 MatrixFunction 计算矩阵形式的 Factorial2 函数::
MatrixFunction[Factorial2, {{1, 2}, {3, 4}}]//FullSimplify特殊值 (3)
在固定点的 Factorial2 的值:
Table[Factorial2[x ], {x, 1, 4}]Factorial2[0]求 Factorial2[x] 的第一个正极大值:
xmax = x /. FindRoot[D[Factorial2[x ], x] == 0, {x, 0.2}]Plot[Factorial2[x], {x, 0, 1}, Epilog -> Style[Point[{xmax, Factorial2[xmax]}], PointSize[Large], Red]]可视化 (2)
绘制 Factorial2 的函数:
Plot[Factorial2[x], {x, -5, 5}]ComplexContourPlot[Re[Factorial2[z]], {z, -1 - I, 1 + I}, Contours -> 20]ComplexContourPlot[Im[Factorial2[z]], {z, -1 - I, 1 + I}, Contours -> 20]函数属性 (10)
FunctionDomain[Factorial2[x], x]FunctionDomain[Factorial2[z], z, Complexes]FullSimplify[Factorial2[Conjugate[z]] == Conjugate[Factorial2[z]]]Factorial2 按元素线性作用于列表:
{1, 3, 5, 7, 9}!!Factorial2 不是解析函数:
FunctionAnalytic[Factorial2[z], z]FunctionMeromorphic[Factorial2[z], z]Factorial2 既不是非递减也不是非递增:
FunctionMonotonicity[Factorial2[z], z]Factorial2 不是单射函数:
FunctionInjective[Factorial2[z], z]Plot[{Factorial2[z], 1.2}, {z, -5, 5}]Factorial2 不是满射函数:
FunctionSurjective[Factorial2[z], z]Plot[{Factorial2[z], 0}, {z, -5, 5}]Factorial2 既不是非负,也不是非正:
FunctionSign[Factorial2[z], z]对于 z≤-2,Factorial2 有奇点和断点:
FunctionSingularities[Factorial2[z], z]FunctionDiscontinuities[Factorial2[z], z]Factorial2 既不凸,也不凹:
FunctionConvexity[Factorial2[z], z]微分 (2)
级数展开 (5)
使用 Series 求泰勒展开:
Series[Factorial2[x], {x, 0, 3}]// Normal// FullSimplifyterms = Normal@Table[Series[Factorial2[x], {x, 0, m}], {m, 1, 5, 2}];
Plot[{Factorial2[x], terms}, {x, -5, 5}]求在 Infinity 处的级数展开:
Series[Factorial2[x], {x, Infinity, 1}]Series[Factorial2[x], {x, -1, 2}, Assumptions -> x > 1]//FullSimplifySeries[Factorial2[x], {x, DirectedInfinity[z], 1}, Assumptions -> x > 0]// FullSimplifySeries[Factorial2[x], {x, x0, 2}]// FullSimplify函数恒等与简化 (3)
Factorial2[n] == n Factorial2[n - 2]//FullSimplify(n - 2)!! == 2^(1/4) (-3 + 2 n - Cos[n π]) π^(1/4) (-1 + Cos[n π]) Gamma[(n/2)]//FullSimplifyn!! == ((n + 2)!!/n + 2)//FullSimplify整数上 Factorial 和 Factorial2 之间的关系:
FullSimplify[n! == n!!(n - 1)!!, n∈ℤ]推广和延伸 (3)
应用 (5)
Plot3D[Abs[Factorial2[x + I y]], {x, -5, 2}, {y, -1, 1}]Underoverscript[∑, n = 0, ∞](2n!/(2n + 1)!!)N[Sum[2 n! / (2 n + 1)!!, {n, 0, 100}], 30]与数值计算 Pi 进行比较:
N[π, 30]Assuming[n∈Integers && n >= 0, FullSimplify[CatalanNumber[n] == (2^2n + 1(2n - 1)!!/(2n + 2)!!)]]对于奇素数
,威尔逊定理的一个推广陈述为
. 验证前几个奇素数:
Table[Mod[(p - 1)!!, p] == Mod[BarnesG[p + 1], p], {p, Prime[Range[2, 11]]}]Table[Det[Array[Min, {n, n}] ^ 2], {n, 9}]Table[(2n - 1)!!, {n, 9}]属性和关系 (8)
使用 FunctionExpand 函数将双阶乘表示为 Gamma 函数的形式:
FunctionExpand[(1 / 2)!!]FunctionExpand[(2n)!!]Refine[%, n∈Integers]用 FullSimplify 来化简包含双阶乘的表达式:
FullSimplify[n!!(n + 1)!! - n n!]包含 Factorial2 的求和:
Sum[k!!, {k, 0, n, 2}]Sum[k!!, {k, 1, n, 2}]Sum[1 / k!!, {k, 0, Infinity, 2}]Sum[1 / k!!, {k, 1, Infinity, 2}]Sum[k!! x ^ k, {k, 1, Infinity, 2}, Regularization -> "Borel"]Sum[k!! x ^ k, {k, 0, Infinity, 2}, Regularization -> "Borel"]Series[%, {x, 0, 12}]Product[(2n - 1)!!, {n, m}]Product[(2n)!!, {n, m}]Factorial2 可被表示为 DifferenceRoot:
DifferenceRootReduce[Factorial2[k], k]FindSequenceFunction 可以识别 Factorial2 序列:
Table[Factorial2[n], {n, 10}]FindSequenceFunction[%, n]Factorial2 的指数母函数:
ExponentialGeneratingFunction[Factorial2[n], n, x]可能存在的问题 (3)
巧妙范例 (3)
在无穷大处绘制 Factorial2:
DensityPlot[Arg[Factorial2[1 / (x + I y)]], {x, -1 / 2, 1 / 2}, {y, -1 / 2, 1 / 2}, Exclusions -> {}]//QuietDigitCount[10000!!]Plot[(n!)! / n!!, {n, -1 / 2, 2}]技术笔记
-
▪
- 组合函数
历史
1988年引入 (1.0) | 在以下年份被更新:2021 (13.0) ▪ 2022 (13.1)
文本
Wolfram Research (1988),Factorial2,Wolfram 语言函数,https://reference.wolfram.com/language/ref/Factorial2.html (更新于 2022 年).
CMS
Wolfram 语言. 1988. "Factorial2." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2022. https://reference.wolfram.com/language/ref/Factorial2.html.
APA
Wolfram 语言. (1988). Factorial2. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/Factorial2.html 年
BibTeX
@misc{reference.wolfram_2026_factorial2, author="Wolfram Research", title="{Factorial2}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/Factorial2.html}", note=[Accessed: 10-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_factorial2, organization={Wolfram Research}, title={Factorial2}, year={2022}, url={https://reference.wolfram.com/language/ref/Factorial2.html}, note=[Accessed: 10-September-2026]}