I am interested in knowing the order of magnitude of the following two weighted sums. The first one is as follows:


Suppose $(w\_1, w\_2, \cdots, w\_{n-1})$ are positive numbers, and suppose that $\lambda$ is a positive real number. Let $d$ be a given positive integer (with $d < \lfloor \lambda \rfloor$). Then I want to know the value of
$$\displaystyle \sum\_{\substack{w\_1 x\_1 + \cdots + w\_{n-1} x\_{n-1} \leq \lambda, \text{ } x\_1 < d}} 1 $$
where the sum is over non-negative integers $x\_1, \cdots x\_{n-1}$.


If $w\_1 = w\_2 = \cdots = w\_{n-1} = 1$ and $\lambda$ is a positive integer, then the above sum can be expressed as $$\displaystyle \sum\_{x\_1 + \cdots + x\_n = \lambda} 1 - \sum\_{x\_2 + \cdots + x\_n = \lambda - d} 1,$$
which can be expressed in closed form:
$$\displaystyle \binom{\lambda + n - 1}{n-1} - \binom{\lambda - d + n - 1}{n-1}$$
which is equal to
$$\displaystyle \frac{(\lambda + n-1) \cdots (\lambda + 1)}{(n-1)!} - \frac{(\lambda - d + n-1) \cdots (\lambda - d + 1)}{(n-1)!} = \frac{d\lambda^{n-2}}{(n-2)!} + O(\lambda^{n-3}).$$
Now my question is for arbitrary weights $(w\_1, \cdots, w\_{n-1})$ and $\lambda$ an arbitrary positive integer, can the same estimate hold? In particular, I am asking if the following equality holds:
$$\displaystyle \sum\_{\substack{w\_1 x\_1 + \cdots + w\_{n-1} x\_{n-1} \leq \lambda, \text{ } x\_1 < d}} 1 = \frac{d\lambda^{n-2}}{w\_1 \cdots w\_{n-1} (n-2)!} + O(\lambda^{n-3})$$


A related question is whether the following weighted sum has a nice asymptotic form as well:


$$\displaystyle \sum\_{\substack{w\_1 x\_1 + \cdots + w\_{n-1} x\_{n-1} \leq \lambda, \text{ } x\_1 < d}} w\_1 x\_1 + \cdots + w\_{n-1} x\_{n-1} $$


I suspect, based on the answer provided at [Values of various weighted sums](https://mathoverflow.net/questions/88449/values-of-various-weighted-sums) , that the asymptotic should be


$$\displaystyle \frac{ d\lambda^{n-1}}{w\_1 \cdots w\_{n-1} (n-2)!} + O(\lambda^{n-2}).$$


A third sum I want to estimate is when the weight of the summands need not be the same as the original weight. In particular, for integral weights $w\_1, \cdots, w\_{n-1}$ and $v\_1, \cdots, v\_{n-1}$ positive real numbers not identical to $w\_1, \cdots, w\_{n-1}$ and $\lambda$ a positive integer:


$$\displaystyle \sum\_{w\_1 x\_1 + \cdots + w\_{n-1}x\_{n-1} = \lambda, x\_1 < d} v\_1 x\_1 + \cdots + v\_{n-1} x\_{n-1}$$


Here I suspect the answer to be


$$\displaystyle \frac{d\lambda^{n-2}}{w\_1 \cdots w\_{n-1}(n-2)!} \left(\frac{v\_1}{w\_1} + \cdots + \frac{v\_{n-1}}{w\_{n-1}}\right) + O(\lambda^{n-3})$$


Any help would be much appreciated.



Some restricted weighted sums
We might as well assume that $\lambda$ is an integer. Then your first
sum is the coefficient of $x^\lambda$ in
 $$ F(x) =\frac{1+x^{w\_1}+x^{2w\_1}+\cdots+x^{(d-1)w\_1}}
 {(1-x^{w\_2})\cdots(1-x^{w\_{n-1}})(1-x)}. $$
The Laurent expansion of $F(x)$ at $x=1$ begins
 $$ F(x) = \frac{d}{w\_2w\_3\cdots w\_{n-1}}\frac{1}{(1-x)^{n-1}}
 +\cdots, $$
so the coefficient of $x^\lambda$ is asymptotic to
 $$ \frac{d}{w\_2\cdots w\_{n-1}}{-(n-1)\choose \lambda} 
 \sim \frac{d}{w\_2\cdots w\_{n-1}}\frac{\lambda^{n-2}}
 {(n-2)!}, $$
agreeing with your first conjecture except that there is no $w\_1$ in the
denominator.


**Addendum.** For the second sum, define
 $$ G(x,y) = \frac{1+x^{v\_1}y^{w\_1}+\cdots+x^{(d-1)v\_1}y^{(d-1)w\_1}}
 {(1-x^{v\_2}y^{w\_2})\cdots(1-x^{v\_{n-1}}y^{w\_{n-1}})}. $$
Then the second sum is equal to the coefficient of $y^\lambda$ in
 $$ \frac{d}{dx} G(x,y)|\_{x=1} =
 \frac{v\_1y^{w\_1}+\cdots+(d-1)v\_1y^{(d-1)w\_1}}
 {(1-y^{w\_2})\cdots (1-y^{w\_{n-1}})} $$
 $$ + \sum\_{k=2}^{n-1} \frac{(1+y^{w\_1}+\cdots+y^{(d-1)w\_1})v\_k}
 {(1-y^{w\_k})\cdot (1-y^{w\_2})(1-y^{w\_3})\cdots
 (1-y^{w\_{n-1}})}. $$
The first term grows like $(1-y)^{-(n-2)}$ and thus is asymptotically
negligible compared to the remaining terms (the sum from $k=2$ to
$n-1$). Thus 
 $$ \frac{d}{dx} G(1,y) \sim d\sum\_{k=2}^{n-1}
 \frac{v\_k}{w\_k(w\_2 w\_3\cdots w\_{n-1})} \frac{1}{(1-y)^{n-1}}. $$
The coefficient of $y^\lambda$ is asymptotic to 
 $$ \frac{d}{w\_2w\_3\cdots w\_{n-1}}\sum\_{k=2}^{n-1}\frac{v\_k}{w\_k}
 \cdot \frac{\lambda^{n-2}}{(n-2)!}. $$
This agrees with the conjecture (up to computational error) except 
for the $w\_1$ factor and $v\_1/w\_1$ term.


