|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
http://functions.wolfram.com/06.42.03.0004.01
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Subfactorial[n] == Floor[(E + 1/E) n!] - Floor[E n!] /;
(Element[n, Integers] && n >= 2) || n == 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cell[BoxData[RowBox[List[RowBox[List[RowBox[List["Subfactorial", "[", "n", "]"]], "\[Equal]", RowBox[List[RowBox[List["Floor", "[", RowBox[List[RowBox[List["(", RowBox[List["\[ExponentialE]", "+", FractionBox["1", "\[ExponentialE]"]]], ")"]], " ", RowBox[List["n", "!"]]]], "]"]], "-", RowBox[List["Floor", "[", RowBox[List["\[ExponentialE]", " ", RowBox[List["n", "!"]]]], "]"]]]]]], "/;", RowBox[List[RowBox[List[RowBox[List["n", "\[Element]", "Integers"]], "\[And]", RowBox[List["n", "\[GreaterEqual]", "2"]]]], "\[Or]", RowBox[List["n", "\[Equal]", "0"]]]]]]]]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<math xmlns='http://www.w3.org/1998/Math/MathML' mathematica:form='TraditionalForm' xmlns:mathematica='http://www.wolfram.com/XML/'> <semantics> <mrow> <mrow> <mrow> <mi> Subfactorial </mi> <mo> ⁡ </mo> <mo> ( </mo> <mi> n </mi> <mo> ) </mo> </mrow> <mo>  </mo> <mrow> <mrow> <mo> ⌊ </mo> <mrow> <mrow> <mo> ( </mo> <mrow> <mi> ⅇ </mi> <mo> + </mo> <mfrac> <mn> 1 </mn> <mi> ⅇ </mi> </mfrac> </mrow> <mo> ) </mo> </mrow> <mo> ⁢ </mo> <mrow> <mi> n </mi> <mo> ! </mo> </mrow> </mrow> <mo> ⌋ </mo> </mrow> <mo> - </mo> <mrow> <mo> ⌊ </mo> <mrow> <mi> ⅇ </mi> <mo> ⁢ </mo> <mrow> <mi> n </mi> <mo> ! </mo> </mrow> </mrow> <mo> ⌋ </mo> </mrow> </mrow> </mrow> <mo> /; </mo> <mrow> <mrow> <mo> ( </mo> <mrow> <mrow> <mi> n </mi> <mo> ∈ </mo> <semantics> <mi> ℤ </mi> <annotation encoding='Mathematica'> TagBox["\[DoubleStruckCapitalZ]", Function[List[], Integers]] </annotation> </semantics> </mrow> <mo> ∧ </mo> <mrow> <mi> n </mi> <mo> ≥ </mo> <mn> 2 </mn> </mrow> </mrow> <mo> ) </mo> </mrow> <mo> ∨ </mo> <mrow> <mi> n </mi> <mo>  </mo> <mn> 0 </mn> </mrow> </mrow> </mrow> <annotation-xml encoding='MathML-Content'> <apply> <ci> Condition </ci> <apply> <eq /> <apply> <ci> Subfactorial </ci> <ci> n </ci> </apply> <apply> <plus /> <apply> <floor /> <apply> <times /> <apply> <plus /> <exponentiale /> <apply> <times /> <cn type='integer'> 1 </cn> <apply> <power /> <exponentiale /> <cn type='integer'> -1 </cn> </apply> </apply> </apply> <apply> <factorial /> <ci> n </ci> </apply> </apply> </apply> <apply> <times /> <cn type='integer'> -1 </cn> <apply> <floor /> <apply> <times /> <exponentiale /> <apply> <factorial /> <ci> n </ci> </apply> </apply> </apply> </apply> </apply> </apply> <apply> <or /> <apply> <and /> <apply> <in /> <ci> n </ci> <integers /> </apply> <apply> <geq /> <ci> n </ci> <cn type='integer'> 2 </cn> </apply> </apply> <apply> <eq /> <ci> n </ci> <cn type='integer'> 0 </cn> </apply> </apply> </apply> </annotation-xml> </semantics> </math>
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
| Cell[BoxData[RowBox[List[RowBox[List["HoldPattern", "[", RowBox[List["Subfactorial", "[", "n_", "]"]], "]"]], "\[RuleDelayed]", RowBox[List[RowBox[List[RowBox[List["Floor", "[", RowBox[List[RowBox[List["(", RowBox[List["\[ExponentialE]", "+", FractionBox["1", "\[ExponentialE]"]]], ")"]], " ", RowBox[List["n", "!"]]]], "]"]], "-", RowBox[List["Floor", "[", RowBox[List["\[ExponentialE]", " ", RowBox[List["n", "!"]]]], "]"]]]], "/;", RowBox[List[RowBox[List["(", RowBox[List[RowBox[List["n", "\[Element]", "Integers"]], "&&", RowBox[List["n", "\[GreaterEqual]", "2"]]]], ")"]], "||", RowBox[List["n", "\[Equal]", "0"]]]]]]]]]] |
|
|
|
|
|
|
|
|
|
|
Date Added to functions.wolfram.com (modification date)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|