For each integer $n \ge 2$, let $A(n)$ be the area of the region in the coordinate plane defined by the inequalities $1\le x \le n$ and $0\le y \le x \left\lfloor \sqrt x \right\rfloor$, where $\left\lfloor \sqrt x \right\rfloor$ is the greatest integer not exceeding $\sqrt x$. Find the number of values of $n$ with $2\le n \le 1000$ for which $A(n)$ is an integer.
Let $k$ be a positive integer.  Then for $k^2 \le x < (k + 1)^2,$
\[x \lfloor \sqrt{x} \rfloor = kx.\]Thus, on this interval, the graph of $0 \le y \le x \lfloor \sqrt{x} \rfloor$ is a trapezoid, with left height $k^3,$ right height $k(k + 1)^2,$ and base $(k + 1)^2 - k^2 = 2k + 1,$ so its area is
\[\frac{k^3 + k(k + 1)^2}{2} \cdot (2k + 1) = 2k^4 + 3k^3 + 2k^2 + \frac{k}{2}.\]Let $n$ be a positive integer such that $k^2 + 1 \le n \le (k + 1)^2.$  Then for $k^2 \le x < n,$ the graph of $0 \le y \le x \lfloor \sqrt{x} \rfloor$ is a trapezoid with left height $k^3,$ right height $kn,$ and base $n - k^2,$ so its area is
\[\frac{k^3 + kn}{2} \cdot (n - k^2) = \frac{k(k^2 + n)(n - k^2)}{2} = \frac{k(n^2 - k^4)}{2}.\]We want to compute the area of the graph for $1 \le x \le n$; in particular, we want this area to be an integer.  We know that the area for $k^2 \le x \le (k + 1)^2$ is
\[2k^4 + 3k^3 + 2k^2 + \frac{k}{2}.\]Since $2k^4 + 3k^3 + 2k^2$ is always an integer, for our purposes, we keep only the $\frac{k}{2}$ term.  This gives us
\begin{align*}
\sum_{i = 1}^{k - 1} \frac{i}{2} + \frac{k(n^2 - k^4)}{2} &= \frac{1}{2} \cdot \frac{(k - 1)k}{2} + \frac{k(n^2 - k^4)}{2} \\
&= \frac{k(k - 1)}{4} + \frac{k(n^2 - k^4)}{2} \\
&= \frac{k[2k(n^2 - k^4) + k - 1]}{4}.
\end{align*}Thus, we want $k[2k(n^2 - k^4) + k - 1]$ to be divisible by 4.  We compute $k[2k(n^2 - k^4) + k - 1]$ modulo 4 for $0 \le k \le 3$ and $0 \le n \le 3,$ and obtain the following results:

\[
\begin{array}{c||c|c|c|c}
k \backslash n & 0 & 1 & 2 & 3 \\ \hline \hline
0 & 0 & 0 & 0 & 0 \\ \hline
1 & 2 & 0 & 2 & 0 \\ \hline
2 & 2 & 2 & 2 & 2 \\ \hline
3 & 0 & 2 & 0 & 2
\end{array}
\]Case 1: $k = 4m$ for some integer $m.$

All integers $n$ in the range $k^2 + 1 \le n \le (k + 1)^2$ work, for a total of $2k + 1$ integers.

Case 2: $k = 4m + 1$ for some integer $m.$

Only odd integers $n$ in the range $k^2 + 1 \le n \le (k + 1)^2$ work.  These are $k^2 + 2,$ $k^2 + 4,$ $\dots,$ $(k + 1)^2 - 1,$ for a total of $k$ integers.

Case 3: $k = 4m + 2$ for some integer $m.$

No integers $n$ in the range $k^2 + 1 \le n \le (k + 1)^2$ work.

Case 4: $k = 4m + 3$ for some integer $m.$

Only even integers $n$ in the range $k^2 + 1 \le n \le (k + 1)^2$ work.  These are $k^2 + 1,$ $k^2 + 3,$ $\dots,$ $(k + 1)^2,$ for a total of $k + 1$ integers.

Thus, the four cases $k = 4m + 1,$ $4m + 2,$ $4m + 3,$ and $4m + 4$ contribute
\[4m + 1 + 4m + 4 + 2(4m + 4) + 1 = 16m + 14.\]integers.

Summing over $0 \le m \le 6$ covers the cases $2 \le n \le 841,$ and gives us
\[\sum_{m = 0}^6 (16m + 14) = 434\]integers.

For $k = 29,$ which covers the cases $529 \le n \le 900,$ we have another 29 integers.

For $k = 30,$ which covers the cases $901 \le n \le 961,$ there are no integers.

For $k = 31,$ only the even integers in the range $962 \le n \le 1024$ work.  We want the integers up to 1000, which are
\[962, 964, \dots, 1000,\]and there are 20 of them.

Thus, the total number of integers we seek is $434 + 29 + 20 = \boxed{483}.$