Find the number of subsets of $\{1,\ 2,\ ,3\ ,\cdots,\ 2021\}$ the sum of whose elements is divisible by $101$. (Empty subset is permitted).
Consider the polynomial $$f(x)=(1+x)(1+x^2)(1+x^3)\cdots(1+x^{2021})$$
Each term in its expanded form will be $$x^m=x^{p_1+p_2+p_3+\cdots + p_{2021}}$$
where each $p_i$ takes a value of $0$, $1$, $2$, $\cdots$, $2021$. Only $0$ can appear multiple times in $p_i$ (when corresponding bracket contributes the constant $1$ to the result), all other values from $1$ to $2021$ will be unique (because none of the variable term in these brackets have the same exponent). Therefore, after eliminating all $0$s, every term $x^m$ can be written in the form of $$x^m=x^{p_1+p_2+p_3+\cdots + p_{k}}$$
where $\mathbb{S} = \{p_1,\ p_2,\ ,\ p_3,\ \cdots,\ p_k\}$ is a subset of $\{1,\ 2,\ ,3\ ,\cdots,\ 2021\}$ and $m$ is the sum of all the elements in $\mathbb{S}$. It follows that the desired answer is the coefficients of the following terms in the expanded form of $f(x)$: $$x^0,\ x^{101},\ x^{202},\ x^{303},\ \cdots$$
Using the complex number method, the sum of these coefficients can be calculated using the following expression where $\omega=e^{i\frac{2\pi}{101}}$ is the complex root to the equation $z^{101}=0$: $$g(\omega)=\frac{1}{101}\left(f(1)+f(\omega) + f(\omega^2) +\cdots + f(\omega^{99})\right)$$
Because $\omega\ne 1$ satisfies $\omega^{101}=1$, it must be true that $$z^{101}-1=(z-1)(z-\omega)(z-\omega^2)\cdots(x-\omega^{100})$$
Setting $z=-1$ to the previous equation yields $$2=(1+1)(1+\omega)(1+\omega^2)\cdots(1+\omega^{100})$$
Note that for any integer $1\le k\le 100$, the set $\{0,\ k,\ 2k,\ \cdots,\ 100k\}$ is a permutation of $\{0,\ 1,\ 2,\ \cdots,\ 100\}$ as residues in $\pmod {101}$. Thus, it must also hold that $$2=(1+1)(1+\omega^k)(1+\omega^{2k})\cdots(1+\omega^{100k})$$
Also note that $2021=101\times 20 +1$. Therefore, $$\begin{align*} f(\omega^k)=\ &(1+\omega^k)(1+\omega^{2k})(1+\omega^{3k})\cdots(1+\omega^{2021k})\\ =\ &\left((1+1)(1+\omega^k)(1+\omega^{2k})\cdots(1+\omega^{100k})\right)^{20}(1+\omega^k)\\ =\ &2^{20}(1+\omega^{k}) \end{align*}$$
It follows that $$\begin{align*} g(\omega)=\ &\frac{1}{101}\left(f(1)+f(\omega)+f(\omega^2)+\cdots + f(\omega^{100})\right)\\=\ &\frac{1}{101}\left(2^{2021}+2^{20}(1+\omega)+2^{20}(1+\omega^2)+\cdots+2^{20}(1+\omega^{100})\right)\\=\ &\frac{1}{101}\left(2^{2021}+2^{20}(100+\omega+\omega^2+\cdots+\omega^{100})\right)\\=\ &\frac{1}{101}\left(2^{2021} + 2^{20}\cdot 99\right)\\=\ &\boxed{\frac{2^{20}}{101}\left(2^{2001}+99\right)}\end{align*}$$