( 2 3 ) ! = 4 0 3 2 0 1 0 = 1 0 0 1 1 1 0 1 1 0 0 0 0 0 0 0 2 .
The factorial shown above has seven trailing zeros .
How many trailing zeroes does the number ( 2 1 6 ) ! have in binary notation?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let n be a positive integer, let p be a prime, and let s be the sum of the digits in n when expressed in base p . Then the number of factors of p in n ! is given by p − 1 n − s .
For n = 2 1 6 and p = 2 , s = 1 , so the number of factors of 2 in ( 2 1 6 ) ! is simply 2 1 6 − 1 = 6 5 5 3 5 .
Prove your claim :)
Log in to reply
It's not hard to prove. Just take n , express it in base p , and apply your formula involving the floors. It works out nicely, and I leave the details to the interested reader.
As Arjen said, we just need to count the powers of 2 in 2 1 6 . We can express this as
n = 1 ∑ 1 6 2 n 2 1 6 = 2 1 6 n = 1 ∑ 1 6 2 n 1
This is because every power of 2 less than or equal to 16 is a divisor of 2 1 6 . On simplifying the GP, we get
2 1 6 ( 1 − 2 1 6 1 ) = 2 1 6 − 1 = 6 5 5 3 5
In fact, with a little thought, it can also be proved that for any positive integral n , ( 2 n ) ! 2 has 2 n − 1 trailing zeroes in base 2.
You mean 2 n − 1 zeroes?
Log in to reply
Oh yes. Thanks a ton for the correction. I have modified my answer.
Problem Loading...
Note Loading...
Set Loading...
Counting trailing zeroes is equal to counting powers of the base-- in this case, powers of 2.
In n ! , each even number ≤ n contributes a power of 2.
Each multiple of four contributes another power of 2.
Each multiple of eight contributes another power of 2.
And so on. Thus the number of factors of 2 in n ! is equal to ( multiples of 2 1 , ≤ n ) + ⋯ + ( multiples of 2 i , ≤ n ) + ⋯ = ⌊ 2 1 n ⌋ + ⋯ + ⌊ 2 i n ⌋ + ⋯ , where 2 i can be limited to be less than or equal to n . The calculation becomes particularly easy when n = 2 k , because the argument of the floor function ⌊ ⋅ ⌋ is a whole number in every instance:
factors of 2 in ( 2 k ) ! = 2 1 2 k + ⋯ + 2 i 2 k + ⋯ + 2 k 2 k = 2 k − 1 + ⋯ + 2 0 = 2 k − 1 .
Substitute k = 1 6 and we find that there are 2 1 6 − 1 = 6 5 5 3 5 factors of 2 in ( 2 1 6 ) ! , and therefore 65335 trailing zeroes in its binary representation.