
6. For each integer $n \geq 1$, define $a_{n}=\left[\frac{n}{[\sqrt{n}]}\right]$, where $[x]$ denotes the largest integer not exceeding $x$, for any real number $x$. Find the number of all $n$ in the set $\{1,2,3, \ldots, 2010\}$ for which $a_{n}>a_{n+1}$.


Solution: Let us examine the first few natural numbers: $1,2,3,4,5,6,7,8,9$. Here we see that $a_{n}=1,2,3,2,2,3,3,4,3$. We observe that $a_{n} \leq a_{n+1}$ for all $n$ except when $n+1$ is a square in which case $a_{n}>a_{n+1}$. We prove that this observation is valid in general. Consider the range

$$
m^{2}, m^{2}+1, m^{2}+2, \ldots, m^{2}+m, m^{2}+m+1, \ldots, m^{2}+2 m
$$

Let $n$ take values in this range so that $n=m^{2}+r$, where $0 \leq r \leq 2 m$. Then we see that $[\sqrt{n}]=m$ and hence

$$
\left[\frac{n}{[\sqrt{n}]}\right]=\left[\frac{m^{2}+r}{m}\right]=m+\left[\frac{r}{m}\right]
$$

Thus $a_{n}$ takes the values $\underbrace{m, m, m, \ldots, m}_{m \text { times }}, \underbrace{m+1, m+1, m+1, \ldots, m+1}_{m \text { times }}, m+2$, in this range. But when $n=(m+1)^{2}$, we see that $a_{n}=m+1$. This shows that $a_{n-1}>a_{n}$ whenever $n=(m+1)^{2}$. When we take $n$ in the set $\{1,2,3, \ldots, 2010\}$, we see that the only squares are $1^{2}, 2^{2}, \ldots, 44^{2}$ (since $44^{2}=1936$ and $\left.45^{2}=2025\right)$ and $n=(m+1)^{2}$ is possible for only 43 values of $m$. Thus $a_{n}>a_{n+1}$ for 43 values of $n$. (These are $2^{2}-1$, $3^{2}-1, \ldots, 44^{2}-1$.)

