When I was playing maths in python, I found some specific equation. The main idea was to sum up all decimals of values from between a specific range. The range is from $a^2$ to $(a+1)^2$. It's because for this borderline values the $\sqrt{x}$ is a integer and for all other values it will be some floating point value. My question was into what value the sum will drop to?
The equation: $$ \lim_{a \to \infty} \Bigg[ \sum_{x = a^2}^{(a+1)^2} \bigg( \sqrt(x) - a \bigg) - 1 - a \Bigg] \approx \frac{1}{6} $$
I tried to evaluate this in wolfram, but it don't say anything about this equation.
Why I think that this equation is correct? Here is the code for it, just play with $a$ value, the bigger it will be then the value comes closer to $\frac{1}{6}$:
from decimal import Decimal, getcontext
prec = 25
getcontext().prec = prec + 2
a = 100
s = Decimal(0)
for x in range(a ** 2, (a + 1) ** 2 + 1):
num = Decimal(x)
sqr = num.sqrt() - a
s += sqr
print(f'>> {x} - {sqr}')
s -= Decimal(1 + a)
res = format(s, f".{prec}f")
print()
print(f'S: {res}')
and here's also a photo of different values of $a$:
Is there any way to calculate the equation and show that it is certainly $\frac{1}{6}$?