Let $\Sigma$ be an alphabet with $m$ different symbols.
Let $s$ be a string in $\Sigma$ of length $n$. Assume that every symbol in $\Sigma$ occurs in $s$ at least once (so $n\geq m$).
Let $\mathrm{Sub}(s)$ be the set of contiguous substrings of $s$. Let $P(\Sigma)$ be the power set of $\Sigma$. There is a map $f:\mathrm{Sub}(s)\to P(\Sigma)$ sending a substring to the set of symbols it contains.
For fixed $m$ and $n$ what is the maximum cardinality of the image of $\mathrm{Sub}(s)\to P(\Sigma)$?
For instance if $m=n$ then $f$ is injective so we get$$1+\frac{n(n+1)}{2}$$different subsets.