There is endless number of surprising features in a
One of them is the following theorem,
for you to prove:
The number of odd entries in row N of Pascal's Triangle is 2k
Bonus: How does k relate to the number of ones in the binary expansion of the number N?
(In reply to Solution
Made a mistake towards the end, hopefully this fixes it:
Let's return to our 3,4 example - We need to show the all of the bits that are 1 in 4's exapnsion are also 1 in N's expansion.
(1) We know that for 4 - all 1 bits are also 1 in N-1's representation (Induction)
(2) We also know that at least 1 of 3's bits are not 1 in N-1's representation (Also Induction)
We add 1 to the first bit of N-1's expansion to get N's expansion. We need to show that 4's bits are still 1 in the new expansion. Let's assume that they are not.
This means that when adding 1 to the first bit of N-1's expansion we had to carry over a 1 to the second bit, otherwise we would stop here with the addition and not change the bits making up 4's representation - this means bit 1 is 1 and not 0 in N-1's exp. We move to the second bit and much the same way find out that it is 1 - and so on.
We get that N-1's expansion starts with 11.. until reaching the bits comprising 4 - but this means we can represent 3 with N-1's bits, in contradiction to (2)..
Posted by Omri
on 2014-09-02 12:09:08