Finsing the number of natural solutions for an inequality Given a vector:
$$
\overrightarrow{r}=\begin{pmatrix}r_{1}\\
r_{2}\\
\vdots\\
r_{m}
\end{pmatrix}
$$
where $$ r_{j}\in\mathbb{R} $$
and given a real number $x$, determine the number of vectors with natural entries, which I'll denote with $k$:
$$
\overrightarrow{k}=\begin{pmatrix}k_{1} & k_{2} & \cdots & k_{m}\end{pmatrix},\ k_{j}\in\mathbb{N}
$$
such that the scalar product between $r$ and $k$ is smaller than $x$:
$$
\overrightarrow{r}\cdot\overrightarrow{k}=\sum_{j=1}^{m}r_{j}\cdot k_{j}\leq x
$$
So this should be a function of $r$ and $x$, I tried finding an asymptotic approximation as $x$ goes to infinity but failed to find one. I would really appreciate a solution or some idea of how you might proceed. I tried looking at simple cases where every entry in $r$ is $1$ or $0$ as well as looking at the geometric interpretation of the scalar product.
Also clarifying, here the natural numbers include $0$.
 A: I'll rename $x$ to $L$ and $k_j$ to $x_j$. Then we are trying to understand the non-negative integer solutions to $\sum r_j x_j \le L$. The simplest special case to look at for intuition is actually $m = 2$; here we are trying to count
$$(x_1, x_2) \in \mathbb{Z}_{\ge 0}^2 : r_1 x_1 + r_2 x_2 \le L.$$
To really see what's happening the idea is to graph the region $\{ (x_1, x_2) \in \mathbb{R}^2_{\ge 0} : r_1 x_1 + r_2 x_2 \le L \}$. This is a right triangle with legs of length $\frac{L}{r_1}$ and $\frac{L}{r_2}$, and we are trying to count the number of lattice points in it. Here's an example graph with $r_1 = 5, r_2 = 8, L = 40$ plotted in WolframAlpha:

This doesn't quite show what's going on because for large $L$ there'd be more lattice points but I couldn't get WolframAlpha to display enough lattice points. The key observation here is that for large $L$ the number of lattice points in a polygon like this is roughly equal to its area, with error proportional to its perimeter; for a convex polygon with lattice point vertices this can be made precise by Pick's theorem. So for large $L$ the number of solutions is
$$\frac{1}{2} \frac{L^2}{r_1 r_2} + O(L).$$
This generalizes to $m$ variables: we're counting lattice points inside a region which is a "right simplex" with legs of length $\frac{L}{r_i}$. The volume of such a thing turns out to be $\frac{1}{m!}$ times the product of the legs of its lengths (this can be proven by integrating repeatedly) and for large $L$ the number of solutions is
$$\frac{1}{m!} \frac{L^m}{r_1 r_2 \dots r_m} + O(L^{m-1}).$$
More precise counts are delicate but see Ehrhart polynomial.
