The Catalan numbers are defined by the formula
C n = n + 1 1 ( n 2 n ) .
How many n are there such that 1 , 0 0 0 ≤ n ≤ 1 0 0 , 0 0 0 and C n is odd?
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.
Here is a solution different from the solution that Patrick gave:
We know that C ( n ) = n + 1 ( n 2 n ) and we also know that ( n 2 n ) = n ! 2 n 1 . 3 . 5 . . . . . . ( 2 n − 1 ) , so that C ( n ) = ( n + 1 ) ! 2 n 1 . 3 . 5 . . . . . . ( 2 n − 1 ) .
Thus C ( n ) is odd if and only if the highest power of 2 in ( n + 1 ) ! is n .
The highest power of 2 in k ! is equal to k − b ( k ) , where b ( k ) is the number of 1 s in the binary expansion of k
Therefore, we want n = n + 1 − b ( n + 1 ) , or b ( n + 1 ) = 1 , which means n + 1 is a power of 2 , so n = 2 p − 1 , for some non-negative integer p .
There are 7 such numbers between 1 0 0 0 and 1 0 0 0 0 0 .
Nice. Is there a quick proof of that bold statement? It generalizes to a formula for any prime p based on the base- p expansion, right?
Log in to reply
Here Sir, this is the formula used in Bold statements..............
nice ,loved it
This paper describes why a Catalan number C n is odd if and only if n is 1 less than some power of 2.
There are only 7 such numbers in the given interval.
Catalan numbers are only odd if and only if n = 2 a 2 − 1 , for a ∈ Z +
What I did was keep values of a to find first four n, which were 1, 7, 17, 31.
This help me create a sequence for finding such values of n as a k + 1 = a k + 4 k + 2 where a 1 = 1
This can be simplified to get ( by applying sums on both sides from k=1, x):
a x + 1 = a 1 + 2 x ( x + 1 ) + 2 x = 1 + 2 x ( x + 2 )
Now I started keeping values of x such that I get a x + 1 such that they satisfy the condition in the question and there were total 7 values.
C 1 7 is not odd. Your formula is wrong. Also, there are a lot more numbers of the form 2 a 2 − 1 in that range, so I'm not sure how you got the right answer.
Log in to reply
I am really one of the most stupid guy, it was 2 a − 1 I will delete the solution as soon as you make a comment.
@Nihar Mahajan please improve this
Problem Loading...
Note Loading...
Set Loading...
The easiest way to do this for me was to use the recurrence C n + 1 = C 0 C n + C 1 C n − 1 + ⋯ + C n C 0 . The terms pair off if n is odd, and they pair off except for the middle term C n / 2 C n / 2 if n is even. So we get that C n + 1 is odd if and only if n is even and C n / 2 is odd.
After that, it is straightforward to prove by induction that C n is odd if and only if n = 2 k − 1 for some positive integer k . The base cases n = 0 , 1 are easy, and now suppose that the result holds up to n . Then C n + 1 is odd if and only if n is even and C n / 2 is odd, which happens if and only if n / 2 = 2 k − 1 for some k by the inductive hypothesis, which happens if and only if n + 1 = 2 k + 1 − 1 . So the result holds for n + 1 .
The numbers of this form between 1 , 0 0 0 and 1 0 0 , 0 0 0 are 2 k − 1 , 1 0 ≤ k ≤ 1 6 . There are 7 of these.
If someone has a way to do the problem directly from the definition using powers of 2 inside binomial coefficients, I'd like to see it. (Edit: see Shourya's solution.)