Ir al contenido
Number Buffet

Factoriales

n! — el producto de todos los enteros hasta n, y el número de maneras de ordenar n cosas. Exacto a cualquier tamaño.

OEIS A000142 · 3 min de lectura

Ajustes

Ajustes rápidos

Terms are produced in order starting from the chosen index.

0! = 1, the empty product. Digit counts grow fast: 100! has 158 digits.

n!! multiplies n, n−2, n−4, … ; !n counts the permutations that fix nothing.

Group long terms as 2,432,902,008,176,640,000 for readability.

Afinar el aspecto

Elige primero un estilo junto a la imagen: estos controles lo ajustan.

Frame

A border drawn inside the edge of the image.

Avanzado

Resultados

15 valores

1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200


Crear una imagen

Activa JavaScript para dar estilo a estos números y descargarlos como imagen. Los valores están listados arriba.

Text on the image

Drag a line straight onto the picture to place it — once placed, it stays exactly where you put it. Everything here is drawn into the download.

El artículo de fondo de más abajo aún no está traducido y se muestra en inglés.

Sobre factoriales

Factorials were counted long before they were named, and almost never by people looking for them. The Anuyogadvāra-sūtra, a canonical Jain text whose dating ranges anywhere from 300 BCE to 400 CE, works out how many ways a set of items can be ordered, setting the sorted and reversed arrangements aside and counting the rest. The Hebrew book of creation Sefer Yetzirah, from the Talmudic period, tabulates factorials up to 7! while asking how many words the Hebrew alphabet can form; the eighth-century Arab grammarian Al-Khalil ibn Ahmad al-Farahidi studied them for much the same linguistic reason. Around 1150 Bhāskara II used them in the Līlāvatī to ask in how many ways Vishnu could hold his conch, discus, mace and lotus in his four hands. Ibn al-Haytham, writing around the turn of the millennium, was the first to state what is now called Wilson's theorem, which ties factorials to the prime numbers.

European work came later, and from odd directions. Luca Pacioli computed up to 11! in a 1494 treatise about seating dinner guests. Marin Mersenne published tables reaching 64! in the 1640s, not all of them correct. In 1677 the English bell-ringer Fabian Stedman described factorials to explain change ringing, the art of permuting a peal of tuned bells. Newton wrote down the exponential series, whose coefficients are reciprocal factorials, in a 1676 letter to Leibniz.

The modern machinery then arrived in a cluster. Abraham de Moivre studied the size of large factorials in 1721, and a 1729 letter from James Stirling to de Moivre gave what is now known as Stirling's approximation — the name is Stirling's, though de Moivre had published a weaker version first. Daniel Bernoulli and Euler, working at the same time, extended the factorial to a continuous function, the gamma function. Legendre's formula for the prime factorisation of n! appeared in 1808, the same year Christian Kramp introduced the notation n!. The word itself is a little older: Arbogast coined the French factorielle in 1800, for a more general class of products.

Propiedades clave

  • 0! = 1, the empty product — the convention that makes C(n, k) = n! / (k!(n−k)!) come out right at k = 0 and k = n.
  • n! = n × (n−1)!, and n! is exactly the number of ways to arrange n distinct objects in a row.
  • 19! = 121,645,100,408,832,000 is the first factorial to exceed 2^53 − 1, the largest integer a JavaScript number holds exactly; 20! = 2,432,902,008,176,640,000 is the largest that fits in a signed 64-bit integer.
  • The number of trailing zeros in n! is ⌊n/5⌋ + ⌊n/25⌋ + ⌊n/125⌋ + … , a case of Legendre's formula. 100! ends in exactly 24 zeros.
  • 0! and 1! are the only factorials that are perfect squares: for every n ≥ 2 there is a prime between n/2 and n, and it divides n! exactly once.
  • The reciprocals of the factorials sum to e: 1/0! + 1/1! + 1/2! + 1/3! + … = 2.718281828…
  • Wilson's theorem: (p − 1)! ≡ −1 (mod p) holds precisely when p is prime, which makes it a (hopelessly slow) primality test.
  • Brocard's problem asks when n! + 1 is a perfect square. Only n = 4, 5 and 7 are known, giving 25, 121 and 5041 = 71²; whether any others exist is still open.

Dónde aparecen

  • A 52-card deck has 52! possible orders — 80,658,175,170,943,878,571,660,636,856,403,766,975,289,505,440,883,277,824,000,000,000,000, about 8.07 × 10⁶⁷ — which is why a properly shuffled deck has almost certainly never occurred before.
  • Factorials sit in the denominators of the Taylor series for eˣ, sin x and cos x, and in the k! of the Poisson distribution, so they turn up in any numerical library that evaluates those.
  • Brute-force routing: a travelling-salesman instance on n cities has (n−1)!/2 distinct tours, which is why exhaustive search stops being feasible somewhere around twenty cities.
  • Sliding-puzzle state spaces: the 15-puzzle has 16!/2 = 10,461,394,944,000 reachable configurations — half of 16!, because sliding tiles can only produce even permutations.
  • Change ringing: a full "extent" on n church bells rings all n! orderings without repetition, the practice Stedman documented in 1677.
  • Plato proposed 5,040 = 7! as the ideal citizen count for a city, partly because it divides so many ways — a philosophical proposal rather than a mathematical result.

Cómo usar este generador

Los valores generados aparecen arriba, con un botón de copiar al lado. Para convertirlos en imagen, elige un aspecto entre los estilos de Crear una imagen, selecciona un tamaño de exportación y descarga en PNG, JPEG o WebP. Todo se renderiza en tu navegador, así que nada de lo que generas se envía a un servidor.

La barra de direcciones se actualiza mientras trabajas, de modo que el enlace reproduce siempre exactamente lo que ves: útil para compartir una secuencia concreta o guardar una configuración. Usa Copiar para llevarte los valores como texto, o Exportar datos para CSV, JSON, NDJSON, SQL o XML.

Fuentes

Los resúmenes históricos de esta página se basan en las referencias de licencia abierta citadas arriba. ¿Has visto un error? Dínoslo y lo corregiremos.