# Maximum entropy discrete distributions with specified mean

Consider a discrete distribution on {1, ...,n}, with mean given as $$m$$, what is the maximum entropy distribution?

I know it takes the form $$p_{X}(k)=ar^{k}$$ and is a geometric distribution when n is infinity but is there a way to solve for $$r$$ and $$a$$ explicitly in this case?