-2

How many ways you can express a natural number with sum of only $1$ and $2$. The ordering matter. $3$ can be expressed in 3 ways: $$3=1+1+1=1+2=2+1$$I have found that it can be done by this way.(Nc0)(1/0!)+((N)c1)(1/N)+((N)c2)(1/((N)(N-1)))+...(Nck)(1/N(N-1)*(N-2)...(N-K+1)).where N is the maximum no of 1's to represent N as sum of . so that is N for sure. and k is the quotient you get by dividing n by 2. so i wanna ask that is there a simpler form to represent the sum

0 Answers0