Let $n>1$ be a natural number and $x_k{}$ be the residue of $n^2$ modulo $\lfloor n^2/k\rfloor+1$ for all natural $k{}$. Compute the sum \[\bigg\lfloor\frac{x_2}{1}\bigg\rfloor+\bigg\lfloor\frac{x_3}{2}\bigg\rfloor+\cdots+\left\lfloor\frac{x_n}{n-1}\right\rfloor.\]
1. We start by analyzing the expression \(\frac{n^2}{\left\lfloor \frac{n^2}{k} \right\rfloor + 1}\) for \(k \leq n\). We need to show that this expression lies in the interval \((k-1, k)\).

2. Consider the inequality:
   \[
   \frac{n^2}{k} < \left\lfloor \frac{n^2}{k} \right\rfloor + 1 < \frac{n^2}{k-1}
   \]
   - The left-hand side (LHS) is straightforward because \(\left\lfloor \frac{n^2}{k} \right\rfloor\) is the greatest integer less than or equal to \(\frac{n^2}{k}\), so \(\left\lfloor \frac{n^2}{k} \right\rfloor + 1\) is greater than \(\frac{n^2}{k}\).
   - For the right-hand side (RHS), we have:
     \[
     \frac{n^2}{k-1} = \frac{n^2}{k} + \frac{n^2}{k(k-1)}
     \]
     Since \(\frac{n^2}{k(k-1)} > 0\), it follows that:
     \[
     \frac{n^2}{k-1} > \frac{n^2}{k} + 1
     \]
     Therefore:
     \[
     \left\lfloor \frac{n^2}{k} \right\rfloor + 1 < \frac{n^2}{k-1}
     \]

3. Given the above, we can conclude that:
   \[
   \frac{n^2}{\left\lfloor \frac{n^2}{k} \right\rfloor + 1} \in (k-1, k)
   \]

4. Next, we compute \(x_k\), the residue of \(n^2\) modulo \(\left\lfloor \frac{n^2}{k} \right\rfloor + 1\):
   \[
   x_k = n^2 - (k-1) \left( \left\lfloor \frac{n^2}{k} \right\rfloor + 1 \right)
   \]

5. We then find \(\frac{x_k}{k-1}\):
   \[
   \frac{x_k}{k-1} = \frac{n^2}{k-1} - \left\lfloor \frac{n^2}{k} \right\rfloor - 1
   \]

6. Taking the floor of the above expression:
   \[
   \left\lfloor \frac{x_k}{k-1} \right\rfloor = \left\lfloor \frac{n^2}{k-1} \right\rfloor - \left\lfloor \frac{n^2}{k} \right\rfloor - 1
   \]

7. Summing this expression from \(k = 2\) to \(k = n\):
   \[
   \sum_{k=2}^{n} \left\lfloor \frac{x_k}{k-1} \right\rfloor = \sum_{k=2}^{n} \left( \left\lfloor \frac{n^2}{k-1} \right\rfloor - \left\lfloor \frac{n^2}{k} \right\rfloor - 1 \right)
   \]

8. Notice that this sum telescopes:
   \[
   \left( \left\lfloor \frac{n^2}{1} \right\rfloor - \left\lfloor \frac{n^2}{2} \right\rfloor - 1 \right) + \left( \left\lfloor \frac{n^2}{2} \right\rfloor - \left\lfloor \frac{n^2}{3} \right\rfloor - 1 \right) + \cdots + \left( \left\lfloor \frac{n^2}{n-1} \right\rfloor - \left\lfloor \frac{n^2}{n} \right\rfloor - 1 \right)
   \]

9. The terms \(\left\lfloor \frac{n^2}{k} \right\rfloor\) cancel out, leaving:
   \[
   \left\lfloor \frac{n^2}{1} \right\rfloor - \left\lfloor \frac{n^2}{n} \right\rfloor - (n-1)
   \]

10. Since \(\left\lfloor \frac{n^2}{1} \right\rfloor = n^2\) and \(\left\lfloor \frac{n^2}{n} \right\rfloor = n\), we have:
    \[
    n^2 - n - (n-1) = n^2 - n - n + 1 = n^2 - 2n + 1 = (n-1)^2
    \]

The final answer is \(\boxed{(n-1)^2}\).