22. Find
$$
\{\ln (1+e)\}+\left\{\ln \left(1+e^{2}\right)\right\}+\left\{\ln \left(1+e^{4}\right)\right\}+\left\{\ln \left(1+e^{8}\right)\right\}+\cdots,
$$
where $\{x\}=x-\lfloor x\rfloor$ denotes the fractional part of $x$.
Solution: $1-\ln (e-1)$
Since $\ln \left(1+e^{2^{k}}\right)$ is just larger than $2^{k}$, its fractional part is $\ln \left(1+e^{2^{k}}\right)-\ln e^{2^{k}}=$ $\ln \left(1+e^{-2^{k}}\right)$. But now notice that
$$
\prod_{k=0}^{n}\left(1+x^{2^{k}}\right)=1+x+x^{2}+\cdots+x^{2^{n+1}-1} .
$$
(This is easily proven by induction or by noting that every nonnegative integer less than $2^{n+1}$ has a unique $(n+1)$-bit binary expansion.) If $|x|<1$, this product converges to $\frac{1}{1-x}$ as $n$ goes to infinity. Therefore,
$$
\sum_{k=0}^{\infty} \ln \left(1+e^{-2^{k}}\right)=\ln \prod_{k=0}^{\infty}\left(1+\left(e^{-1}\right)^{2^{k}}\right)=\ln \frac{1}{1-e^{-1}}=\ln \frac{e}{e-1}=1-\ln (e-1) .
$$