How many compositions of n has first part 1?
I've been trying to figure this out, if the number of compositions on n is 2^(n-1) then would the number of compositions of n with the first part 1 be 2^(n-2)?
How many compositions of n has first part 1?
I've been trying to figure this out, if the number of compositions on n is 2^(n-1) then would the number of compositions of n with the first part 1 be 2^(n-2)?
If you fix the first part of your composition of $n$, then the remaining parts give a composition of $n-1$. Therefore the formula you give is basically correct, though you should have some doubt about its validity for $n\leq1$. In fact the number of compositions of $n$ equals $2^{n-1}$ only if $n>0$ (and the number $0$ has one, empty, composition), so the number of composition of $n$ with first part $1$ is $2^{n-2}$ only if $n>1$. The full formula is $$ \#\{\text{compositions of $n$ with first part }1\} = \begin{cases} 0 & \text{if }n=0\\ 1 & \text{if }n=1\\ 2^{n-2} & \text{if }n>1 \end{cases} $$