$n!=1\times 2\times 3\times \cdots \times n$ $0!=1$ $f(n)=\begin{cases}1&\textrm{ if }n=0,\,n=1\\nf(n-1)&\textrm{ if }n>1\end{cases}$ [[TableOfContents]] = 0! = 1인 이유 = (x+1)! = (x+1)x! x=0을 대입하면, (0+1)! = (0+1)0! 1! = (1)0! 1 = 0! = Prg Lang Impl = 여러 언어 구현 참조: http://rosettacode.org/wiki/Factorial 다음과 같은 여러 방법이 있음 == using recursion == [[재귀,recursion]] == using loop == == using memoization == == using gamma function == $x!=\mathrm{\Gamma}(x+1)$ 을 이용. 여기서 $\mathrm{\Gamma}$ 는 [[감마함수,gamma_function]]. ---------- [[순열,permutation]], [[조합,combination]], [[이항계수,binomial_coefficient]] 계산에 쓰임. 순열의 경우, $_n\mathrm{P}_{n}=n!$ sub? 상승계승 rising_factorial 하강계승 falling_factorial /// Ndict:상승계승 Google:rising.factorial Google:falling.factorial rel. [[순열,permutation]] = 하강계승? chk [[완전순열,complete_permutation]] = 교란순열 = 교란 = Srch:derangement 소수계승 or 소계승?? primorial ... rel [[소수,prime_number]] curr see [[Namu:소수%20계승]] Google:primorial (prime + factorial) ---- 계승은 [[자연수,natural_number]] ℕ,,0,,에서 정의. 계승을 더 ''([[정의역,domain]]을 자연수→실수 [[확장,extension]]?? [[일반화,generalization]]? chk)'' 일반적으로 확장시킨 개념은 [[감마함수,gamma_function]]를 참조. 참고로, $n!=\mathrm{\Gamma}(n+1)$ 계승의 다양한 확장 https://jjycjnmath.tistory.com/515 * 감마함수 * 준계승(subfactorial) - 완전순열 complete_permutation or 교란 derangement 관련, (curr see [[순열,permutation]]) (derangement : see [[WpEn:Derangement]]) * 이중계승(double factorial) 및 다중계승(multiple factorial, multifactorial) * 소수계승(primorial) * 초계승(superfactorial) [[근사,approximation]]를 위한 [[스털링_공식,Stirling_s_formula]]이 있음. ---- AKA '''팩토리얼, 차례곱'''(북한말) [[https://terms.naver.com/entry.naver?docId=3338402&cid=47324&categoryId=47324 수학백과: 계승]] https://planetmath.org/factorial https://mathworld.wolfram.com/Factorial.html https://encyclopediaofmath.org/wiki/Factorial [[Namu:계승(수학)]]