Let 1⩽a<b be two relatively prime integers. Sylvester found that ab−a−b is the largest integer which can not be represented by ax+by(x,y∈Z⩾0) about 160 years ago and this number shall be denoted by ga,b. Let N(a,b)={n:n⩽ga,b,n=ax+by,x,y∈Z⩾0} and πa,b be the number of primes in N(a,b). Recently, Ramírez Alfonsín and Skałba proved thatπa,b≫εga,b(logga,b)2+ε for any fixed ε>0. They further conjectured that the order of the magnitude of πa,b is 12π(ga,b), where π(x) is the number of all primes up to x. In this paper, we show that the conjecture is true for almost all pairs a,b with 1⩽a<b and (a,b)=1. The proofs rely heavily on the Bombieri–Vinogradov theorem and Brun–Titchmarsh theorem.