How many positive integers n < 1 0 0 0 are there, such that n ! is divisible by 2 n − 1 ?
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.
Very elegant solution!
Brilliant!
would you please explain in more easier way
Log in to reply
You may want to look at Victor C.'s solution. It is more explicit, and, in particular, does not use induction. So you will probably find it easier to understand. I do encourage you to work through the C L.'s solution. To understand it better, try plugging in some particular small values of n .
We can see that if n = 2 k for some positive integer k and the function π 2 ( n ) giving the number of prime factors 2 in n , we have: π 2 ( 2 k ! ) = 2 k − 1 + π 2 ( 2 k − 1 ! ) ⇒ π 2 ( 2 k ! ) = 2 k − 1 And hence, π 2 ( n ! ) = n − 1 ⇒ 2 n − 1 ∣ n !
Otherwise, having n = 2 k + m with 0 < m < 2 k , we have: π 2 ( ( 2 k + m ) ! ) = π 2 ( 2 k ! ) + π 2 ( m ! ) ⇒ π 2 ( n ) = 2 k − 1 + π 2 ( m ) = π 2 ( m ! ) + n − m − 1
We must investigate if π 2 ( n ! ) ≥ n − 1 , but from last result we have: π 2 ( n ! ) = π ( m ! ) + n − m − 1 ≥ n − 1 ⇒ π 2 ( m ! ) ≥ m
And that's impossible, because obviously n = 2 k is the best case possible and π 2 ( n ! ) < n .
So, the only solutions are n = 2 k , k ∈ { 0 , 1 , . . . , 9 }
Nice job! Very explicit and straight to the point.
I think you need to explain why "obviously n = 2 k is the best case possible".
Log in to reply
You're right, I was trying to make the solution smaller and jumped that part.
For any n , we find k such that 2 k − 1 < n ≤ 2 k and proceed with the following implications:
π 2 ( n ! ) = π 2 ( 1 × 2 × . . . × n ) = π 2 ( 2 × 4 × . . . × 2 ⌊ 2 n ⌋ ) = ⌊ 2 n ⌋ + π ( ⌊ 2 n ⌋ ! )
So we define m 1 = ⌊ 2 n ⌋ , keeping in mind that 2 ∗ m 1 ≤ n , holding equality if and only if n is even.
So now we have π 2 ( n ! ) = m 1 + π 2 ( m 1 ! ) , and we keep doing this until the function π 2 vanishes from the sum. In the end:
π 2 ( n ! ) = m 1 + m 2 + . . .
and from the inequality 2 ∗ m k + 1 ≤ m k , we can say m k ≤ 2 k − 1 and hence
π 2 ( n ! ) ≤ 2 k − 1 + 2 k − 2 + . . . + 1
Having equality if and only if for each k , 2 ∗ m k + 1 = m k . So equality holds when n divided consecutively by 2 is always even (or 1), which means, n is power of 2.
This is another way of proving the first result, since we now end up with the sum:
π 2 ( n ! ) = i = 0 ∑ k − 1 2 i = 2 k − 1 = n − 1
Log in to reply
Yes, this inequality is not totally obvious. However, the first few lines of the C.L's solution provide an easy proof (change n to m ). Your argument also works.
Sorry, there is a typo. I forgot about the " ! ". The 4th equation line should be: π 2 ( n ! ) = 2 k − 1 + π 2 ( m ! ) = π 2 ( m ! ) + n − m − 1
We claim that 2 n − 1 ∣ n ! if and only if n is a power of 2 .
First, recall by Legendre's Theorem that the largest power of 2 that divides n ! is f ( n ) = ⌊ 2 n ⌋ + ⌊ 2 2 n ⌋ + ⌊ 2 3 n ⌋ + ⋯ (Call it f ( n ) for convenience.) Thus, the claim is equivalent to showing that f ( n ) ≥ n − 1 if and only if n is a power of 2 . In fact, we will prove the stronger statement:
Lemma: f ( n ) = n − 1 if n is a power of 2 and f ( n ) < n − 1 otherwise.
Proof: If n is a power of 2 , then we can write n = 2 m for some nonnegative integer m , and f ( n ) = 2 m − 1 + 2 m − 2 + ⋯ + 1 = 2 m − 1 = n − 1 as expected.
Now we use induction to prove that if n is not a power of 2 , then f ( n ) < n − 1 . We will prove that for all positive integers m ≥ 2 , every positive integer n less than 2 m that is not a power of 2 satisfies f ( n ) < n − 1 . The base case m = 2 is trivial since f ( 3 ) = 1 < 3 − 1 . Now assume the statement holds for some m = k . To prove that it is true for m = k + 1 we need to show that for all 2 k < n < 2 k + 1 that are not powers of 2 , f ( n ) < n − 1 . Note that n can be written as n = 2 k + a for some 0 < a < 2 k . Thus f ( n ) = f ( 2 k + a ) = = = ≤ = < 2 k − 1 + ⌊ 2 a ⌋ + 2 k − 2 + ⌊ 2 2 a ⌋ + ⋯ 2 k − 1 + 2 k − 2 + ⋯ + 1 + f ( a ) 2 k − 1 + f ( a ) 2 k − 1 + ( a − 1 ) 2 k + a − 2 2 k + a − 1 which completes the induction. □
Thus the claim at the beginning is proved and it only remains to compute the number of powers of 2 less than 1 0 0 0 . Since 2 9 < 1 0 0 0 < 2 1 0 , the answer is 9 + 1 = 1 0 .
My way is listing the disibility of n! By 2^(n-1) from n=1 until I found the pattern
List => n=1 -> 1|1 => n=2 -> 2|2 => n=3 -> not => n=4 -> 8|24 => n=5 -> not . . . . => n=8 -> 128|40320 => n=9 -> not => n=10 -> not
From this list , we not for every n which can be formed as 2^k , with k positve integers , 2^(n-1) divide n! So n=2^0 , 2^1 , 2^2 , ... , 2^9 ->> We get 10 solutions
Sorry I can't wrtite latex
The answer is correct, but can you justify your pattern?
that's how I did it
Log in to reply
I know utkarsh, that's how you did it.... But how can you justify the fact that the statement holds for no number other than the powers of 2? Either you have gone with your instincts (which is totally non-mathematical) or you have used calculator and tested all the numbers which is much more non-mathematical. In my solution I form a conjecture that this statement holds for the powers of 2, then i prove it using GP (geometric progression). Then I form another conjecture that this statement holds for no numbers other than the powers of 2. For the proof of this I assume that the statement holds for a number between (2^k) and [2^(k+1)]. Then I bound all the floor functions using two or three tricks and show their infinite sum to be less than 2^(k+1) - n - 1. The contradiction proves the statement. I cannot describe the tricks in bounding the infinite sum of floor functions (although they were quite simple) due to lack of knowledge in lateX.
The highest power of 2 that divides n ! is ⌊ 2 n ⌋ + ⌊ 4 n ⌋ + ⋯ . Note that this is less than 2 n + 4 n + ⋯ = n . One can probably guess that ⌊ 2 n ⌋ + ⌊ 4 n ⌋ + ⋯ = n − 1 when n is a power of two. Indeed, ⌊ 2 2 k ⌋ + ⌊ 4 2 k ⌋ + ⋯ = 2 k − 1 + 2 k − 2 + ⋯ + 1 = 2 k − 1 . If n is not a power of two, then we have 2 k < n < 2 k + 1 for some integer k . But then ⌊ 2 k n ⌋ = 0 and thus ⌊ 2 n ⌋ + ⌊ 4 n ⌋ + ⋯ + ⌊ 2 k n ⌋ ≤ 2 n + 4 n + ⋯ + 2 k − 1 n + 0 = 2 k − 1 ( 2 k − 1 − 1 ) n < n − 1 , a contradiction. Thus, only n = 1 , 2 , . . . , 5 1 2 work, so there are 10 solutions.
Small typo: near the middle of the solution it should read "If n is not a power of two, then we have 2 k − 1 < n < 2 k for some integer k " (rather than 2 k < n < 2 k + 1 ).
if we try for the first few numbers, we find that every number that can be expressed as 2 power n satisfies the equation( 2^0=1;2^1=2;2^2=4.......2^9=512) therefore 10 numbers
This is not a solution!!
how does this yield to answer?
Now I got the logic. Yes your solution is perfect.Thannks.
It can be divided as long as the degree of 2 in n! is greater than or equal to (n-1). This condition is fulfilled when n is one of the power of 2. Every time n=2^a, flooring (2^a/2) gives ((2^a)-1)) which is (n-1). So total there are 9 possibilities from this method (2, 4, 8, 16, 32, 64, 128, 256, 512), and including the fact that n=1 (2^0) is also an answer, there are total 10 possibilities.
1,2,4,16,32,64,128,256,512 the logic is double of the number satidfies the condition
Problem Loading...
Note Loading...
Set Loading...
The maximum power of 2 which divides n ! is given by:
S ( n ) : = [ 2 n ] + [ 4 n ] + [ 8 n ] + …
First note that S ( n ) ≤ n − 1 since the infinite sequence 2 n + 4 n + 8 n + … equals n and so S ( n ) ≤ n ; but equality cannot hold since that would require [ 2 k n ] = 2 k n for all k , which is impossible for positive n . Since S ( n ) is an integer, we must have S ( n ) ≤ n − 1 .
Next, [ j 1 [ k n ] ] = [ j k n ] for positive integers n , j , k , so:
S ( n ) = [ 2 n ] + S ( [ n / 2 ] ) .
We say that a positive integer n is brilliant if S ( n ) = n − 1 .
Claim 1 : n = 1 is brilliant.
Claim 2 : if n > 1 is odd, then it's not brilliant.
Proof : Write n = 2 j − 1 for an integer j ≥ 1 . Then [ 2 n ] = j − 1 so we have S ( n ) = j − 1 + S ( j − 1 ) ≤ j − 1 + ( j − 2 ) = 2 j − 3 < n − 1
and the result follows.
Claim 3 : n = 2 k is brilliant if and only if k is brilliant.
Proof : Again, since [ 2 n ] = k we have S ( n ) = k + S ( k ) , so S ( n ) = n − 1 holds if and only if S ( k ) = k − 1 , so the result follows.
From the above claims, n is brilliant if and only if it's a power of 2.