I have a problem and I don't know how I can start to solve it. Do you know someone a formula, algorithm or type of problems like this?
I have only number N
, N
candies, and I need to count the number of ways of taking N
candies, but except the first candy taken, the candy taken must be adjacent to one of previous candies taken before. For example if N = 3
there are 4 ways of taking:
The number of ways for n
candies is the sum of the n-1
th row of pascal's triangle.