POV-Ray : Newsgroups : povray.off-topic : Some math problems : Re: Some math problems Server Time
5 Sep 2024 09:21:51 EDT (-0400)
  Re: Some math problems  
From: triple r
Date: 24 Sep 2009 23:10:01
Message: <web.4abc33d8d82eca7c958421d50@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>   4) By their nature, factorials tend to accumulate trailing zeroes. For
> example, 5! (120) has one trailing zero, 10! (3628800) has two trailing
> zeroes, 25! (15511210043330985984000000) has six trailing zeroes, etc.
>
>   Give a (non-recursive) mathematical function which, for an integer n,
> gives the number of trailing zeroes in n!.

That's closely related to this exceedingly difficult problem, at least for those
of us not familiar with number theory.

http://projecteuler.net/index.php?section=problems&id=160

I spent a lot of time on this, but was never able to get the right answer.  You
basically need a closed-form solution since you can't even iterate a simple
model that far in a reasonable amount of time.

 - Ricky


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.