Factorial/base problem

e^x

New member
Joined
Jun 11, 2020
Messages
21
Full question: What is the number of consecutive zeroes at the rightmost end of the number 20! when it is expressed in base 8?
Where I'm stuck: I could try to take the time and calculate what 20! is in base 10 and then convert it to base 8, but I'm hoping someone can help me find a shortcut.
 
Full question: What is the number of consecutive zeroes at the rightmost end of the number 20! when it is expressed in base 8?
Where I'm stuck: I could try to take the time and calculate what 20! is in base 10 and then convert it to base 8, but I'm hoping someone can help me find a shortcut.
Let's assume 20! = A * 8^n ....... where A is is not divisible by 8 .............................. edited

n = ?
 
I think Subhotosh Khan meant to say "where A is is not divisible by 8."
 
I think Subhotosh Khan meant to say "where A is is not divisible by 8."
Correct and the response (#2) has been corrected accordingly.

Jomo is going to complain again about special privilege .........
 
Correct and the response (#2) corrected accordingly.

Jomo is going to complain again about special privilege .........
That complaint would be a redundancy. If privilege is not special, then it is not privilege.
 
Full question: What is the number of consecutive zeroes at the rightmost end of the number 20! when it is expressed in base 8?
This is a classic problem that occurs in every section on basic counting theory that I have ever used. The topic is called TRAILING ZEROS.
A trailing zero is created by a factor of \(5\) paired with a factor of \(2\).
Because \(16!\) factored contains \(2^{15}~\&~5^3\) then \(16!\) has three trailing zeros.
It is instructive to see that both of \(23!~\&~24!\) have four training zeros but \(25!\) has six trailing zeros.
Can you explain why?
 
Last edited:
Full question: What is the number of consecutive zeroes at the rightmost end of the number 20! when it is expressed in base 8?
Where I'm stuck: I could try to take the time and calculate what 20! is in base 10 and then convert it to base 8, but I'm hoping someone can help me find a shortcut.
pka discussed the base-ten version of this kind of problem; yours is actually easier, in a sense.

Here's a simpler example. Suppose we want to find the number of trailing zeros in 8!, in base 8. A trailing zero is formed by a power of 8; for instance, 8^2 in base 8 will have zeros in the 8^0 and 8^1 places; so 8^k (= 2^{3k}) has k trailing zeros. Do you follow that?

So for each 3 2's in the factorization of a number, there will be one trailing zero, since 2^3 = 8.

Now, how many 2's are there in the factorization of 8! = 8*7*6*5*4*3*2*1? There's 1 from the 2, 2 from the 4, 1 from the 6, and 3 from the 8, for a total of 1+2+1+3 = 7. The highest power of 8 in 2^7 is 2^6 = 8^2; so 8! has 2 trailing zeros.

Can you apply this to your problem?
 
Top