Optimal probability mass function with domain $\mathbb N^+$ Given nonnegative infinite sequence $\left( y_k \right)_{k \geq 1}$ with $\displaystyle\sum_{k \geq 1} y_k = 1$, solve the optimization problem
$$\begin{array}{ll} \text{maximize} & \displaystyle\sum_{k \geq 1} k \, x_k \, y_k\\ \text{subject to} & \displaystyle\sum_{k \geq 1} k \, x_k = a\\ & \displaystyle\sum_{k \geq 1} x_k = 1\\ & x_k \geq 0\end{array}$$
What about the infinite sequence $\left( x_k \right)_{k \geq 1}$ that minimizes the sum?
I made this problem up.  I am interpreting $\left( x_k \right)_{k \geq 1}$ and $\left( y_k \right)_{k \geq 1}$ as probability distributions over the positive integers and $a$ is an expected value. My guess is this type of problem has been well studied, which is why I am asking here. Thank you.
Edit:
After doing some research, it appears that the above problem may have a solution which can be computed with linear programming.  However, there is little to no chance of there being a nice form for the solution if the $y_n's$ are arbitrary.
So to make the problem more manageable, I posted a modified problem:
Optimization of Probability Mass Function Linear Programming
 A: I don't have a complete answer, but I'll go ahead and share my thoughts...
We cannot have $a < 1$, because this implies the problem is infeasible.
If $a = 1$, the only feasible solution is $x_1 = 1$.
If $a > 1$, let $j \equiv \arg \max_k k y_k$ (assuming there is a maximum). There are then 3 sub-cases to consider:


*

*If $j = a$, set $x_j = 1$.  You are done.

*If $j < a$, the optimal value is not achieved, but is approached by a sequence of solutions of the form $x_j = 1 - \delta$, $x_n = \delta$, where $\delta$ satisfies $n \delta + j(1-\delta)=a$.  As $n$ increases, $\delta$ decreases, and the objective value approaches $j y_j$.

*If $j > a$... I don't know.

A: Let $M\le a$ be the supremum of the sum $f(x)=\sum_{k \geq 1} k \, x_k \, y_k$, where a vector $x=(x_k)$ satisfies the given conditions. We claim that 
$$M=M’=\sup\left\{\frac{(a-m)ny_n-(a-n)my_m}{n-m}: m\le a\le n, m\ne n \right\}.$$ 
Indeed, if $m<n$,  $x_m+x_n=1$ and $mx_m+nx_n=a$ then $x_m=\frac{n-a}{n-m}$ and $x_n=\frac{a-m}{n-m}$. The numbers  $x_m$ and $x_n$ are non-negative iff $m\le a\le n$. Thus $M\ge M’$.
On the other hand let $\varepsilon>0$ be an arbitrary number and  $x$ be a vector $x=(x_k)$ satisfying the conditions such that $f(x)<M-\varepsilon$. Pick a number $N’$ such that $\sum_{k>N’} kx_ky_k<\varepsilon$. Put $s_1=\sum_{k>N’} x_k$ and $s_a=\sum_{k>N’} kx_k$. If $s_1=0$ put $N=N’$, otherwise put $$N=\lceil s_a/s_1\rceil+1\ge s_a/s_1+1\ge N’+2.$$ 
Let $x’=(x’_1,\dots, x’_N)$ be a solution of the following optimization problem O
$$\begin{array}{ll} \text{maximize} & \displaystyle\sum_{k=1}^N k \, x’_k \, y_k\\ \text{subject to} & \displaystyle\sum_{k=1}^N k \, x’_k = a \\ & \displaystyle\sum_{k=1}^N x’_k = 1\\ & x’_k \geq 0\end{array},$$
containing the smallest number $n_0$ of non-zero coordinates. We claim that $n_0$ is at most two. Indeed, assume that for some distinct indices $l$, $m$, and $n$  each of $x’_l$, $x’_m$, $x’_n$ is postive. Fix all $x’_k$’s, but $x’_l$, $x’_m$, $x’_n$, put $s’_1=1-\sum_{k\ne l, m, n} x’_k$,  $s’_a=1-\sum_{k\ne l, m, n} kx’_k$, and consider  the following optimization problem 
$$\begin{array}{ll} \text{maximize} & \displaystyle l\bar x_ly_l+ m\bar x_my_m+ n\bar x_ny_n\\ \text{subject to} & \displaystyle l\bar x_l+ m\bar x_m + n\bar x_n=s’_a \\ & \displaystyle \bar x_l+ \bar x_m +\bar x_n=s'_1 \\ & \bar x_l, \bar x_m, \bar x_n\geq 0\end{array}.$$
In this problem we have to find a maximum of a linear function $$f(\bar x_l, \bar x_m, \bar x_n)= l\bar x_ly_l+ m\bar x_my_m+ n\bar x_ny_n$$ on an intersection of a triangle $T$ defined by conditions $$\bar x_l+ \bar x_m +\bar x_n=s’_1\mbox{ , }\bar x_l, \bar x_m, \bar x_n\geq 0$$ with a plane defined by an equation $$l\bar x_l+ m\bar x_m + n\bar x_n=s’_a.$$ Such a intersection can be either a segment (then the maximum of $f$ is attained in one of its endpoints) or the triangle $T$ (then the maximum of $f$ is attained in one of its vertices). Anyway, the maximum is attained in a point $(\bar x_l, \bar x_m, \bar x_n)$ belonging to a plane defined by one of the following equation $\bar x_l=0$, $\bar x_m=0$, or $\bar x_n=0$. Now define a vector $\bar x=(\bar x_1,\dots, \bar x_N)$ by putting $\bar x_k=x’_k$ for each $k$ distinct from $l,m,n$. Then $\bar x$ is a solution of the problem having less non-zero coordinates than $n_0$,
which contradicts its minimality. Thus $n_0\le 2$.
Now put $x^*=(x^*_k)$, where $x^*_k=x’_k$, if $k\le N$, and $x^*_k=0$, otherwise. 
Since $x^*_m+x^*_n=1$ and $mx^*_m+nx^*_n=a$, we see that $f(x^*)\le M’$. 
Now we construct a vector $x’’=(x’’_1,\dots, x’’_N)$ satisfying the constraints of the problem O as follows. Put $x’’_k=x_k$ for each $k\le N’$. If $s_1=0$ then put $x’’_k=0$ for the remaining $k$. Otherwise determine $x’’_{N’+1}$ and $x’’_N$ from the system $$x’’_{N’+1}+x’’_N=s_1\mbox{ and }(N’+1)x’’_{N’+1}+Nx’’_N=s_a,$$ so we have $$x’’_{N’+1}=\frac {Ns_1-s_a}{N-N’-1}\ge 0\mbox{ and }x’’_N=\frac {s_a-(N’+1)s_1}{N-N’-1}\ge 0,$$ and put $x’’_k=0$ for the remaining indices. Put $x^{**}=(x^{**}_k)$, where $x^{**}_k=x’’_k$, if $k\le N$, and $x^{**}_k=0$, otherwise. Thus we have
$$M’\ge f(x^*)\ge f(x^{**})\ge f(x)-\sum_{k>N’} kx_ky_k>M-\varepsilon-\varepsilon=M-2\varepsilon.$$ 
Since the number $\varepsilon$ can be chosen arbitrarily small, we have $M=M’$.
