For any positive integers
$k_1,k_2$ and any set
$A\subseteq \mathbb {N}$, let
$R_{k_1,k_2}(A,n)$ be the number of solutions of the equation
$n=k_1a_1+k_2a_2$ with
$a_1,a_2\in A$. Let g be a fixed integer. We prove that if
$k_1$ and
$k_2$ are two integers with
$2\le k_1<k_2$ and
$(k_1,k_2)=1$, then there does not exist any set
$A\subseteq \mathbb {N}$ such that
$R_{k_1,k_2}(A,n)-R_{k_1,k_2}(\mathbb {N}\setminus A,n)=g$ for all sufficiently large integers n, and if
$1=k_1<k_2$, then there exists a set A such that
$R_{k_1,k_2}(A,n)-R_{k_1,k_2}(\mathbb {N}\setminus A,n)=1$ for all positive integers n.