How can I formally write the number of subsets of $S=\{1,2,3,4,5,6,7,8\}$ with at least 1 odd and 1 even number?
I know if I take the subset with even numbers, $E =\{2,4,6,8\}$, there are $2^4-1$ subsets with even numbers (excluding $Ø$), and the same number for an the odd subset, $O$, and multiplying these together will give me an exact answer. But I'm not really satisfied because this isn't very formal, and I don't know how to show this with the proper mathematical symbols.
Thanks in advance !
What you said using words is quite formal enough.
Symbolically, you want:
$$\begin{align} &\quad\Bigl|\mathcal P(\{1,2,3,4,5,6,7,8\})\setminus \bigl(\{\varnothing\}\cup\mathcal P(\{1,3,5,7\})\cup\mathcal P(\{2,4,6,8\})\bigr)\Bigr| \\ &= \Bigl|\mathcal P(\{1,2,3,4,5,6,7,8\})\Bigr| - \Bigl(\bigl|\mathcal P(\{1,3,5,7\})\bigr|+\bigl|\mathcal P(\{2,4,6,8\})\setminus\{\varnothing\}\bigr|\Bigr) \\ &= 2^8-(2^4+2^4-1) \\ &= 2^8-2^5+1 \end{align}$$
Which is a little more compact, but conveys the same reasoning.