Factorial

The Faculty ( sometimes, especially in Austria, also called factorial ) is in mathematics a function that assigns a natural number, the product of all natural numbers less than and equal to this number. You will be abbreviated by an argument trailing exclamation mark ( "!"). This notation was first used in 1808 by the Alsatian mathematician Christian Kramp ( 1760-1826 ), who is also the name faculté " ability " for introduced around 1798.

  • 4.1 Python program
  • 5.1 Gamma function
  • 5.2 factorial
  • 5.3 primorial ( Primfakultät )
  • 5.4 Subfakultät
  • 5.5 Double Faculty
  • 5.6 Multi Faculty
  • 5.7 Super faculty
  • 5.8 Hyper Faculty

Definition

For all natural numbers

As the product of the natural numbers from 1 to defined. Since the empty product is always 1, but also applies

The faculty can also define recursively:

Faculties of negative or non-integer numbers are not defined.

Examples

The values ​​of the faculties form sequence A000142 in OEIS.

Applications

Permutations

In the enumerative combinatorics faculties play an important role, because the number of possibilities is to arrange distinguishable objects in a row. If one - element set, so is the number of bijective mappings ( the number of permutations ). This is particularly true for the case in which there is exactly one way to map the empty set to itself.

For example, there are in a car race six drivers different options for the order at the finish line, when all the riders reach the goal. In the first place all six riders come into question. If the first driver arrived, only five riders can compete for the second place. For the assignment of the second place, it is crucial which of the six driver does not have to be taken into account ( as it is already placed on rank 1). It must therefore be counted separately for each assignment possibility of # 1, how many placement possibilities for place 2 exist. For the assignment of the positions 1 and 2, therefore, arise in six drivers options. Is also the second place awarded, eligible for third place only four drivers in question, resulting in the first three places and six driver placement possibilities, etc. Ultimately, there are so

Different rankings for the finish.

Binomial coefficients

A concept that plays a similarly central position as the faculty in the enumerative combinatorics, the binomial coefficient

It specifies the number of ways to select a - element subset from a - element set. Here is the most popular example, the number Lotto 6 from 49

Opportunities.

Taylor series

A prominent place, occur at the faculties, are the Taylor series of many functions such as the sine function and the exponential function.

Euler number

The Euler number can be defined as the sum of the reciprocals of the faculties:

Numerical

The numerical value can easily be calculated recursively or iteratively, if it is not too large.

The largest faculty, which can be calculated from most of the commercial calculators is, there is outside the number range normally available. The largest floating-point number as in double precision format of the IEEE -754 standard displayable faculty.

If is large, you get a good approximation for using the Stirling formula:

This means that the ratio of left and right side converges to.

Python program

Implementation of the factorial computation in a Python program ( in the Python programming language can be expected arbitrarily large integers, sets limits only the available memory ).

On an Intel Pentium 4, for example, requires the calculation of 10000! only a few seconds. The number has 35660 points in the decimal, the last 2499 points consist only of the number zero.

#! / usr / bin / python # Syntax: Python 3.3.0 n = int (input ( ' Factorial of n = ')) f = 1 for i in range (1, n 1):      f = f ​​* i print ( n, '! =', f, sep ='') #! / usr / bin / python # Syntax: Python 2.7 n = int ( raw_input ( ' Factorial of n = ')) f = 1 for i in range (1, n 1):      f = f ​​* i print n, '! = ', F Faculty -like features

There are a number of other consequences and functions that look similar in their definition or their properties, such as the Faculty:

Gamma function

The Gamma function generalizes the faculty to their domain of the natural to the complex numbers:

Factorial

A combinatorial generalization represent the rising and falling factorial and is, because.

Primorial ( Primfakultät )

The Primfakultät of a number is the product of the primes less than or equal to the number:

Subfakultät

The Subfakultät occurring mainly in combinatorics

Denotes the number of all fixed-point- free permutations of elements.

Double factorial

The double factorial rarely used or faculty double is the product

If, in addition we define 0! = 1 and (-1)! = 1 as the empty product. For example, the number of fixed-point- free involutory permutations of elements in integral tables and formulas for special functions appear on the double factorial. But instead expressions are often used with the ordinary faculty:

If non-integer function values ​​allowed, then there is exactly one extension to negative odd numbers, so that n! = N · ( n-2)! valid for all odd integers n. This gives the formula for odd n <0

The number of digit combinations from foreign element pairs formed from elements is given by the recursion Recursion (2 elements ). Resolution of the recursion results. If, for example clubs meet by drawing pairs, then the probability that this particular two play against each other, given by.

Multi Faculty

Analogous to the double faculty a triple (), four-fold ( ), ..., times Faculty () recursively defined as

Super faculty

The term Super faculty is used (at least) two different functions; a is defined as the product of the first faculties:

With the Barnes'schen function, the other as a multiple power of a faculty

Hyper Faculty

The Hyper Faculty is defined for natural follows:

It can be generalized by the K- function to complex numbers.

Related Functions

  • Smarandache function

Prime exponent

If not the full number is searched, but only the exponent of one of its prime factors, so value can be determined directly and efficiently.

Here is the exponent of the prime factorization of.

In the above example would be for the number of zeros at the end of 10,000! the exponent to be determined in 5, the exponent of 2 is definitely bigger.

247382
de