Factorial Digits

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram CDF Player or other Wolfram Language products.

Requires a Wolfram Notebook System

Edit on desktop, mobile and cloud with any Wolfram Language product.

Computing leads to large numbers quickly. In fact, the largest factorial most calculators can handle is 69!, because 70! is a 101-digit number. It is easy, however, to compute a few leading digits and the total number of digits, as well as the number of trailing zeros of a factorial. With some extra work you can also compute the last nonzero digit.

Contributed by: Oleksandr Pavlyk (March 2011)
Additional contributions by: Stan Wagon
Open content licensed under CC BY-NC-SA



The last nonzero digit code is based on the work of Vladimir Dudchenko, the first prize winner of the Russian StudentMathematicacontest.

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.