(49g 50g) Number of Trailing Zeros in N!
|
06-03-2022, 02:03 AM
Post: #2
|
|||
|
|||
RE: (49g 50g) Number of Trailing Zeros in N!
We can also use the recurrence:
a(n) = floor(n/5) + a(floor(n/5)); This program is for the HP-42S but should work with most other models as well: Code: 00 { 14-Byte Prgm } This program is for the HP-48: Code: \<< 0 Example \( \begin{align} n &= 7392 \\ \\ a(n) &= 1478 + 295 + 59 + 11 + 2 \\ &= 1845 \\ \end{align} \) References Quote:Gardner, M. "Factorial Oddities." Ch. 4 in Mathematical Magic Show: More Puzzles, Games, Diversions, Illusions and Other Mathematical Sleight-of-Mind from Scientific American. New York: Vintage, pp. 50-65, 1978 Thank you for reminding me of this book. I got the German translation "Mathematische Hexereien" as a teenager. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(49g 50g) Number of Trailing Zeros in N! - John Keith - 06-02-2022, 08:51 PM
RE: (49g 50g) Number of Trailing Zeros in N! - Thomas Klemm - 06-03-2022 02:03 AM
RE: (49g 50g) Number of Trailing Zeros in N! - John Keith - 06-03-2022, 02:05 PM
RE: (49g 50g) Number of Trailing Zeros in N! - Thomas Klemm - 06-03-2022, 03:19 PM
RE: (49g 50g) Number of Trailing Zeros in N! - John Keith - 06-03-2022, 08:52 PM
RE: (49g 50g) Number of Trailing Zeros in N! - John Keith - 06-04-2022, 06:53 PM
|
User(s) browsing this thread: 1 Guest(s)