Solution (source code)

= Solution

A distribution on $\{1,2,\ldots\}$ must have $\mu\geq1$. For $\mu>1$, put $p=1/\mu$ and let
$$
G(k)=p(1-p)^{k-1}.
$$
For any mass function $P$ with mean $\mu$, <Gibbs inequality> gives
$$
\begin{aligned}
D(P\Vert G)
&=-H(P)-\log_2p-(\mu-1)\log_2(1-p)\\
&=H(G)-H(P)\geq0.
\end{aligned}
$$
Thus the <geometric distribution> uniquely maximizes entropy. For $\mu=1$, the only admissible law is the point mass at one, which is the limiting geometric case $p=1$.