We showed in one of our classes that for $n\geq 1$ the number of words with the length $n$ in $B^*$ with $B=\{a,ab,abb,abbbb,...\}$ is $2^{n-1}$.
We used generating functions for that example. I want to proof it without generating functions.
We know that $B^*$ is generated free of $B$ in the following sense (and I think we could use it somehow here):
Let $\sum$ be an alphabet and $B\subseteq \sum^*$ a language. $B^*=\{w=v_1...v_n| v_1,...,v_n\in B\}$. We say that $B^*$ is generated free of $B$, if we have a unique $n\geq 1$ and unique $v_1,...,v_n\in B$ for every $w\in B^*$, so that $w=v_1...v_n$.
Help is highly appreciated and thank you in advance!
Your problem here is the definition of length. In your second definition, you consider length with respect to $B$, that is every $v_i$ has length one, so $w$ has length $n$. However, in the first part of the question, length is considered with respect to the set $\{a,b\}$, i.e. $ab \in B$ has length two, even though it is an element of $B$.
To properly prove the number of words of length $n$, you might want to show that $$B^{*} = \{ w \in \{a,b\}^{*} \mid w \text{ starts with } a\}.$$ Then it is not hard to show that there are $2^{n-1}$ elements of length $n$ (counting $a$s and $b$s) here.