Hello, pankaj!
Find the number of odd numbers among the following:
. .
I don't have a formula yet, but look at the pattern . . .
We are dealing with the numbers in Pascal's Triangle.
Note the locations of the odd numbers (denoted ). Code:
O
O O
O . O
O O O O
O . . . O
O O . . O O
O . O . O . O
O O O O O O O O
O . . . . . . . O
O O . . . . . . O O
O . O . . . . . O . O
O O O O . . . . O O O O
O . . . O . . . O . . . O
O O . . O O . . O O . . O O
O . O . O . O . O . O . O . O
O O O O O O O O O O O O O O O O
And this triangular pattern continues down Pascal's Triangle.