Let $N \geq 1$ be a sufficiently large integer, let $a > 1$ be a real number, and let $n_1, \dots, n_t$ be integers between $0$ and $K$, where $K$ divides $N$. I want to determine the following:
$$ \arg\max_{\substack{0 \leq n_1, \dots, n_t \leq K \\ \sum_i n_i = N}} \sum_{i=1}^t q^{n_i} $$
If $K = N$ this is maximized by putting all the weight on a single power, say $n_1 = N$. With this intuition I think that the above sum with bounded exponents is maximized when all the nonzero $n_i$ are exactly $K$. Is this true? If so, is there an easy proof?
It is maximized when all the nonzero $n_i$ are exactly $K$.
Hint: