Fattoriale
Definizione
Per ogni
[math]n \in \mathbb{N}[/math]
, si definisce il fattoriale ricorsivamente così come segue
[math]n! = \egin{cases} 1 & \quad \text{se } n = 0 \\ n \cdot (n-1)! & \quad \text{se } n > 0 \ \end{cases}[/math]
Pertanto il fattoriale di ogni numero naturale [math]n[/math]
coincide con il prodotto dei primi [math]n[/math]
naturali
[math]n! = n \cdot (n-1) \cdot \ldots \cdot 3 \cdot 2 \cdot 1 = prod_{k=1}^n k[/math]
Proprietà del fattoriale
Direttamente dalla definizione discendono le seguenti proprietà
[math]\frac{n!}{(n-1)!} = n \quad \forall n \in \mathbb{N} setmi
us {0}[/math]
us {0}[/math]
[math]\frac{n!}{n} = (n-1)! \quad \forall n \in \mathbb{N} setmi
us {0}[/math]
us {0}[/math]
[math]\frac{n!}{m!} = n \cdot (n-1) \cdot \ldots \cdot (n - m + 2) \cdot (n - m + 1) \quad n, m \in \mathbb{N}, \quad n > m[/math]
Vale inoltre l'approssimazione di Stirling
[math]n! \approx n^n \cdot e^{-n} \sqrt{2 \\pi n}[/math]
Semifattoriale Definizione
Per ogni [math]p \in \mathbb{N}[/math] pari, si definisce il semifattoriale ricorsivamente così come segue
[math]p!! = \egin{cases} 1 & \quad \text{se } p = 0 \\ p \cdot (p-2)!! & \quad \text{se } p \ge 2 \ \end{cases}[/math]
Nel caso di [math]d \in \mathbb{N}[/math]
dispari, la definizione è del tutto analoga
[math]d!! = \egin{cases} 1 & \quad \text{se } d = 1 \\ d \cdot (d-2)!! & \quad \text{se } d \ge 3 \ \end{cases}[/math]
Dunque per ogni naturale pari [math]p[/math]
, il semifattoriale di [math]p[/math]
equivale al prodotto di tutti i naturali pari compresi fra [math]2[/math]
e [math]p[/math]
[math]p!! = p \cdot (p - 2) \cdot (p - 4) \cdot \ldots \cdot 4 \cdot 2 = prod_{k=1}^{\frac{p}{2}} 2k[/math]
Analogamente, per ogni naturale dispari [math]d[/math]
, il semifattoriale di [math]d[/math]
equivale al prodotto di tutti i naturali dispari compresi fra [math]1[/math]
e [math]d[/math]
[math]d!! = d \cdot (d - 2) \cdot (d - 4) \cdot \ldots \cdot 5 \cdot 3 \cdot 1 = prod_{k=0}^{\frac{d-1}{2}} 2k + 1[/math]
Proprietà del semifattoriale
Il fattoriale ed il semifattoriale sono legati dalla seguente formula
[math]n! = n!! \cdot (n-1)!! \quad \forall n \in \mathbb{N} setmi
us {0}[/math]
us {0}[/math]