Factorial Digits

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.

(17 lines omitted)

The last nonzero digit code is based on the work of Vladimir Dudchenko, the first prize winner of the Russian Student Mathematica contest.
comments
 
Powered by Wolfram Mathematica
Give us your feedback
Give us your feedback

Source page:




 often  occasionally  never

Note: Please do not include anything you consider confidential or proprietary. Your message and contact information may be shared with the author of any specific Demonstration for which you give feedback, but will not otherwise be published or distributed.
Privacy Policy »

Note: To run this Demonstration you need the free
Mathematica Player
or Mathematica 7+
Download or upgrade to Mathematica Player 7
I already have Mathematica Player or Mathematica 7+