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 , 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.