
Number Theory Number Theory Math Forum 
 LinkBack  Thread Tools  Display Modes 
August 16th, 2018, 04:14 AM  #1 
Newbie Joined: Aug 2018 From: TÃ¼rkiye Posts: 1 Thanks: 0  The number of a number in the prime factorization of a factorial
How do we find, for example, how many '5's there are in the prime factorization of n! ? I've read that it's floor(n/5), but why is that? Thanks a lot. Last edited by skipjack; August 16th, 2018 at 01:26 PM. 
August 16th, 2018, 05:12 AM  #2 
Member Joined: Aug 2015 From: Montenegro (Podgorica) Posts: 37 Thanks: 4 
Because 5 must appear at least once in every fifth number from 1 to n. Sent from my HUAWEI SCLL04 using Tapatalk 
August 16th, 2018, 07:49 AM  #3 
Global Moderator Joined: Dec 2006 Posts: 20,474 Thanks: 2039 
So it would be at least floor(n/5), not necessarily exactly floor(n/5).

August 16th, 2018, 12:14 PM  #4 
Global Moderator Joined: May 2007 Posts: 6,730 Thanks: 689 
The answer is $\sum_{k=1}^{\infty}\lfloor \frac{n}{5^k}\rfloor$. Note that the sum is finite since terms where $5^k \gt n$ are all 0.


Tags 
factorial, factorization, number, prime 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
The relationships between Prime number and Fibonacci number (Part 2)  thinhnghiem  Math  0  May 15th, 2018 08:07 AM 
The relationships between Prime number and Fibonacci number  thinhnghiem  Number Theory  15  December 18th, 2016 01:31 PM 
Sum based on number of primes in a factorial  oasawant  Number Theory  6  October 25th, 2012 06:25 AM 
Prime factorization and Stirling number  zoizaite  Algebra  1  January 13th, 2012 05:49 AM 
Computing Factorial of a Number  prashantakerkar  Algebra  9  November 15th, 2011 10:55 PM 