Counting the terms and growth of a nondecreasing sequence Given a nondecreasing sequence $\{\lambda_n\}_n$, consider the function
$$n(r) = \#\{n\mid \lambda_n \leq r\}.$$
I want to prove that the statements
$\lim_{n\to \infty}\frac{n}{\lambda_n} = L$
and $\lim_{r\to\infty} \frac{n(r)}{r} = L$ are equivalent.
To do so, I've tried the following:
Assuming the first limit $\lim_{n\to \infty}\frac{n}{\lambda_n} = L$, for each $\varepsilon > 0$ there is some $n_0$ such that for all $n\geq n_0$, $|\frac{n}{\lambda_n} - L|<\varepsilon$. Then,
$$n(r) = \#\{n\mid \lambda_n \leq r\} = \#\left\{n\mid \frac{n}{r} \leq \frac{n}{\lambda_n}\right\},$$
so this function should be "roughly equal" to
$$\#\left\{n\mid \frac{n}{r}\leq L\right\} = \#\{n\mid rL\geq n\} = [rL]$$
and so the other limit follows.
I think the reverse implication is immediate if this reasoning is true, by going the other way. My problem is: how can I justify the shaky step properly? Is this the right path?
 A: Here is one way by which you can formalize the "shaky" step:
Fix $\epsilon>0$ and find $n_0$ such that $n>n_0$ implies $n/\lambda_n\in (L-\epsilon, L+\epsilon)$. As you've pointed out,
$$n(r) = \#\left\{n:\lambda_n\leq r\right\} = \#\left\{n:\frac{n}{r}\leq \frac{n}{\lambda_n}\right\}.$$
If we define the set to be $A(r)$ (so that $n(r) = \# A(r))$, then we have the following equation:
$$n(r) = \#(A(r)\cap\{n\leq n_0\})+\#(A(r)\cap\{n>n_0\}).$$
For $r$ sufficiently large, the first term is just some constant depending only on $n_0$. Let's call it $C(n_0)$. The second term, however, can be estimated using the fact $n/\lambda_n\in (L-\epsilon, L+\epsilon)$ for $n>n_0$. We have
$$\left\{n:\frac{n}{r}\leq L-\epsilon \right\}\cap\{n>n_0\}\subset A(r)\cap \{n>n_0\}\subset \left\{n:\frac{n}{r}\leq L+\epsilon\right\}\cap\{n>n_0\}.$$
It is not difficult to see that the cardinality of the left term is $\lfloor r(L-\epsilon)\rfloor - n_0$ while the cardinality of the right term is $\lfloor r(L+\epsilon)\rfloor - n_0$. Putting this altogether, we have
$$\lfloor r(L-\epsilon)\rfloor - n_0\leq n(r)-C(n_0)\leq \lfloor r(L+\epsilon)\rfloor - n_0.$$
Dividing this inequality by $r$ and taking $\limsup$, we conclude that
$$L-\epsilon\leq \limsup_{r\to\infty} \frac{n(r)}{r}\leq L+\epsilon.$$
Since our choice of $\epsilon>0$ at the beginning was arbitrary, we conclude the $\limsup$ is exactly $L$. This same logic works with $\liminf$, so the limit exists and is equal to $L$, the common value of the $\limsup$ and $\liminf$.
This logic doesn't seem immediately reversible for the other direction, but perhaps a similar idea works.
A: I'll denote the counting function
$$
N(r) = \#\{n\mid \lambda_n \leq r\}.
$$
with a capital $N$ to avoid confusion with $n$ being used as an index. We must also assume that the sequence $(\lambda_n)$ is unbounded (i.e. it diverges to $+\infty$) because otherwise $N(r) = \infty$ for large $r$.
The problem with your approach is to make the “roughly equal” argument strict, i.e. replace it with concrete estimates. You must also consider that $|\frac{n}{\lambda_n} - L|<\varepsilon$ holds only for sufficiently large $n$. Also it is not immediately obvious (at least not to me :) how proving the reverse implication by “by going the other way” would work.
I'll suggest a slightly different approach, where $N(r)$ is estimated from  above and from below.

First assume that $\lim_{r\to\infty} \frac{N(r)}{r} = L$ exists. It follows from the definition of $N(r)$ that
$$
 N(\lambda_n - 1) < n \le N(\lambda_n)
$$
and therefore
$$
 \frac{\lambda_n - 1}{\lambda_n} \cdot \frac{N(\lambda_n-1)}{\lambda_n-1}
< \frac{n}{\lambda_n} \le \frac{N(\lambda_n)}{\lambda_n} \, .
$$
Both the left-hand side and the right-hand side of that inequality chain converge to $L$, therefore $\lim_{n\to \infty} \frac{n}{\lambda_n} = L$.

Now assume that $\lim_{n\to \infty} \frac{n}{\lambda_n} = L$ exists. Let $(r_k)$ be an increasing sequence of positive real numbers converging to $+\infty$. For each $k$ we can find an $n_k$ such that
$$ 
 \lambda_{n_k} \le r_k <  \lambda_{n_k+1} \, .
$$
Then $N(r_k) = n_k$ and therefore
$$
\frac{n_k+1}{\lambda_{n_k+1}} \cdot \frac{n_k}{n_k+1} < \frac{N(r_k)}{r_k} \le 
\frac{n_k}{\lambda_{n_k}} \, .
$$
Since $n_k \to \infty$ for $k\to \infty$, both the left-hand side and the right-hand side of the inequality chain converge to $L$. It follows that $\lim_{k \to \infty} \frac{N(r_k)}{r_k} = L$. This holds for all increasing unbounded sequences $(r_k)$, so that $\lim_{r\to\infty} \frac{N(r)}{r} = L$.

Remark: A slight variation of the above arguments shows that the following relationships hold, even if the limits do not exist:
$$
\liminf_{r\to\infty} \frac{N(r)}{r} = \liminf_{n\to \infty} \frac{n}{\lambda_n}
$$
and
$$
\limsup_{r\to\infty} \frac{N(r)}{r} = \limsup_{n\to \infty} \frac{n}{\lambda_n} \, .
$$
