Since this MSE question didn't find any suitable answers, I decided to post it here.
I was trying to maximize the function $$f(r)=\binom nr\cdot 2^{n-r}$$ This can be done by the standard technique of looking at $\frac {f(r)}{f(r+1)}$ and the answer we get is that $r=\left\lfloor\frac n3\right\rfloor$ if $n=3k$ or $n=3k+1$, and $r=\left\lfloor\frac n3\right\rfloor, \left\lfloor\frac {n+1}3\right\rfloor$ if $n=3k+2$. So, we can also say that the maximizing set of $f(r)=\binom nr\cdot 2^{n-r}$ is the set $\mathcal M_2=\left\{\left\lfloor\frac n3\right\rfloor, \left\lfloor\frac {n+1}3\right\rfloor\right\}$. Note that this set is irrespective of the modulo class of $n$ (as $\mathcal M_2=\{k,k\}=\{k\}$if $n=3k$ or $n=3k+1$).
I was trying to play with this idea and figured out that if for some $p\in \mathbb N$, we define $$f(r)=\binom nr\cdot (p-1)^{n-r}$$ then the maximizing set is $\mathcal M_{p-1}=\left\{\left\lfloor\frac np\right\rfloor, \left\lfloor\frac {n+1}p\right\rfloor\right\}$.
I tried to play a little bit more with the maximizing set and started thinking about the set $$\mathcal M=\left\{\left\lfloor\frac np\right\rfloor, \left\lfloor\frac {n+1}p\right\rfloor, \dots ,\left\lfloor\frac {n+p-j}p\right\rfloor\right\}$$ where $0\leq j\leq p$. Note that $\mathcal M$ still has only atmost $2$ elements since if $n=pk+i$, then $$\left\{\left\lfloor\frac np\right\rfloor, \left\lfloor\frac {n+1}p\right\rfloor, \dots ,\left\lfloor\frac {n+p-j}p\right\rfloor\right\}=\{k\}\text{ if }i<j$$ $$\left\{\left\lfloor\frac np\right\rfloor, \left\lfloor\frac {n+1}p\right\rfloor, \dots ,\left\lfloor\frac {n+p-j}p\right\rfloor\right\}=\{k,k+1\}\text{ if }i\geq j$$
My question is, is there any combinatorial function that is maximized by $\mathcal M$? In other words, is there any combinatorial function $f_n(r)$ whose maximizing set is $\mathcal M$? I tried to construct some multinomials, but couldn't proceed much. I would like to have some ideas.
Edit: Since mutinomials didn't help, I was thinking in terms of graphs. If we consider a graph of a binomial, it has the typical binomial structure. What we are trying to achieve is to shift the maxima of that structure accordingly as $j$. So, it may happen that the function we are looking for is the binomial multiplied with some constant. Intuitively, we may even guess that this constant may be a box function involving $j$ somehow in it. But, I couldn't make any more out of this idea. See if it helps.