For , let be the geometric distribution
If is the law of , Gibbs inequality gives
Therefore
For , the nonnegative random variable is zero almost surely and both sides vanish. This proves that the maximum entropy distribution on the nonnegative integers with fixed expected value is geometric.