The diameter of a circle of radius $R$ is divided into $2n$ equal parts. The point $M$ is taken on the circle. Prove that the sum of the squares of the distances from the point $M$ to the points of division (together with the ends of the diameter) does not depend on the choice of the point $M$. Calculate this sum.


1. **Define the points of division on the diameter:**
   The diameter of the circle is divided into \(2n\) equal parts. Therefore, the points of division on the x-axis are:
   \[
   -R, -\frac{(2n-1)R}{2n}, -\frac{(2n-2)R}{2n}, \ldots, -\frac{R}{2n}, 0, \frac{R}{2n}, \ldots, \frac{(2n-2)R}{2n}, \frac{(2n-1)R}{2n}, R
   \]

2. **Express the coordinates of point \(M\):**
   Let \(M\) be a point on the circle with coordinates \((R\cos \alpha, R\sin \alpha)\).

3. **Calculate the distance from \(M\) to each point of division:**
   The distance from \(M\) to a point \((x_i, 0)\) on the x-axis is given by:
   \[
   d_i = \sqrt{(R\cos \alpha - x_i)^2 + (R\sin \alpha)^2}
   \]
   Squaring this distance, we get:
   \[
   d_i^2 = (R\cos \alpha - x_i)^2 + (R\sin \alpha)^2
   \]

4. **Sum the squares of the distances:**
   We need to sum the squares of the distances from \(M\) to all \(2n+1\) points of division (including the ends of the diameter):
   \[
   \sum_{i=0}^{2n} d_i^2 = \sum_{i=0}^{2n} \left[(R\cos \alpha - x_i)^2 + (R\sin \alpha)^2\right]
   \]

5. **Simplify the expression:**
   \[
   \sum_{i=0}^{2n} d_i^2 = \sum_{i=0}^{2n} \left[(R\cos \alpha - x_i)^2 + R^2 \sin^2 \alpha\right]
   \]
   \[
   = \sum_{i=0}^{2n} (R^2 \cos^2 \alpha - 2R \cos \alpha x_i + x_i^2 + R^2 \sin^2 \alpha)
   \]
   \[
   = \sum_{i=0}^{2n} (R^2 (\cos^2 \alpha + \sin^2 \alpha) - 2R \cos \alpha x_i + x_i^2)
   \]
   Using the Pythagorean identity \(\cos^2 \alpha + \sin^2 \alpha = 1\):
   \[
   = \sum_{i=0}^{2n} (R^2 - 2R \cos \alpha x_i + x_i^2)
   \]

6. **Separate the sums:**
   \[
   = \sum_{i=0}^{2n} R^2 - 2R \cos \alpha \sum_{i=0}^{2n} x_i + \sum_{i=0}^{2n} x_i^2
   \]

7. **Evaluate the sums:**
   - The sum of the \(x_i\) values (which are symmetrically distributed around 0) is zero:
     \[
     \sum_{i=0}^{2n} x_i = 0
     \]
   - The sum of the squares of the \(x_i\) values:
     \[
     \sum_{i=0}^{2n} x_i^2 = \sum_{k=1}^{n} \left(\left(\frac{kR}{n}\right)^2 + \left(\frac{(2n-k)R}{2n}\right)^2\right)
     \]
     Simplifying, we get:
     \[
     \sum_{i=0}^{2n} x_i^2 = 2 \sum_{k=1}^{n} \left(\frac{kR}{n}\right)^2 = 2 \cdot \frac{R^2}{n^2} \sum_{k=1}^{n} k^2
     \]
     Using the formula for the sum of squares of the first \(n\) natural numbers:
     \[
     \sum_{k=1}^{n} k^2 = \frac{n(n+1)(2n+1)}{6}
     \]
     Therefore:
     \[
     \sum_{i=0}^{2n} x_i^2 = 2 \cdot \frac{R^2}{n^2} \cdot \frac{n(n+1)(2n+1)}{6} = \frac{R^2 (n+1)(2n+1)}{3n}
     \]

8. **Combine the results:**
   \[
   \sum_{i=0}^{2n} d_i^2 = (2n+1)R^2 + \frac{R^2 (n+1)(2n+1)}{3n}
   \]
   Simplifying further:
   \[
   \sum_{i=0}^{2n} d_i^2 = R^2 \left(2n+1 + \frac{(n+1)(2n+1)}{3n}\right)
   \]
   \[
   = R^2 \left(\frac{3n(2n+1) + (n+1)(2n+1)}{3n}\right)
   \]
   \[
   = R^2 \left(\frac{6n^2 + 3n + 2n^2 + 3n + 1}{3n}\right)
   \]
   \[
   = R^2 \left(\frac{8n^2 + 6n + 1}{3n}\right)
   \]
   \[
   = R^2 \left(\frac{8n^2 + 6n + 1}{3n}\right)
   \]

The final answer is \(\boxed{R^2 \left(\frac{8n^2 + 6n + 1}{3n}\right)}\)