2 elements {a,b} result:
- a, b, ab
3 elements {a,b,c} result:
- a, b, c, ab, ac, bc, abc
4 elements {a,b,c,d} result:
- a, b, c, d, ab, ac, ad, bc, bd, cd, abc, abd, acd, bcd, abcd
5 elements {a,b,c,d,e} result:
- a, b, c, d, e, ab, ac, ad, ae, bc, bd, be, cd, ce, de, abc, abd, abe, acd, ace, ade, bcd, bce, bde, cde, abcd, abce, abde, acde, bcde, abcde
and so on...
Looks like you want the number of nonempty ordered substrings of $a_1a_2...a_n$. Since the order is predetermined, all you have to do is specify which symbols are in the substring.
How many ways are there to do that?