  Let $1<c<d$ be two relatively prime integers. For a non-negative integer
$\ell$, let $g_\ell(c,d)$ be the largest integer $n$ such that $n=c x+d y$ has
at most $\ell$ non-negative solutions $(x,y)$. In this paper we prove that $$
\pi_{\ell,c,d}\sim\frac{\pi\bigl(g_\ell(c,d)\bigr)}{2 \ell+2}\quad(\text{as}~
c\to\infty)\,, $$ where $\pi_{\ell,c,d}$ is the number of primes $n$ having
more than $\ell$ distinct non-negative solutions to $n=c x+d y$ with $n\le
g_\ell(c,d)$, and $\pi(x)$ denotes the number of all primes up to $x$. The case
where $\ell=0$ has been proved by Ding, Zhai and Zhao recently, which was
conjectured formerly by Ram\'{\i}rez Alfons\'{\i}n and Ska{\l}ba.
