I think there is still some mismatch in the $\frac{1}{\sqrt{n/12}}$ terms. As I understand it this term multiplies $k$ in the sum but not $x$ in the integral. My answer proceeds on this basis.
Let $$f(x) = \exp\left(-\frac{\left(x + \frac{1}{2\sqrt{3}}\right)^2}{2}\right)$$
Let $\ell = \min I, L=\max I$ and $a=-1/(2\sqrt {12})$.
So basically you are comparing
$$\sum_\ell^{L} \frac{1}{\sqrt{n/12}} f\left(\frac k {\sqrt{n/12}}\right) \mathrm{~with~} \int_{\infty}^a f(x) dx$$
Let us consider one small piece of this comparison:
$$\left|\frac{1}{\sqrt{n/12}} f\left(\frac k {\sqrt{n/12}}\right) - \int_{\frac{k}{\sqrt{n/12}}}^{\frac{k+1}{\sqrt{n/12}}} f(x) dx\right| \\
=\int_{\frac{k}{\sqrt{n/12}}}^{\frac{k+1}{\sqrt{n/12}}} \left| f\left(\frac k {\sqrt{n/12}}\right)-f(x)\right| dx $$
Now it is easy to see that $f'(x) < 1 \quad \forall x\in \mathbb R$. In fact, the derivative of $\exp(-x^2/2)$ attains it maximum value of $\sqrt{\exp(-1)}$ at $x=1$. Therefore the integrand is less than $\frac{1}{\sqrt{n/12}}$ and since the interval of integration is also $\frac{1}{\sqrt{n/12}}$, the absolute value of the integral is less than $\frac{12}{n}$
Since the number of elements in $I$ is $O(L-\ell) = O(n^{3/4})$, we get
$$\left|\sum_\ell^{L} \frac{1}{\sqrt{n/12}} f\left(\frac k {\sqrt{n/12}}\right) - \int_{\frac{\ell}{\sqrt{n/12}}}^{\frac{L+1}{\sqrt{n/12}}} f(x) dx\right| = O(n^{3/4})\frac{12}{n} = O(n^{-1/4}) $$
It remains to consider the two tails of the integral. The left tail is very easy. The normal distribution tail decays exponentially:
$1-\mathfrak N(x) < x^{-1}\mathfrak n(x)= O(\exp(-x^2/2))$
Where $\mathfrak N(x)$ denotes the normal cumulative distribution function and $\mathfrak n(x)$ denotes the normal density. It follows that $\int_{-\infty}^{-\ell/\sqrt{n/12}} f(x) dx$ is negligible relative to the $O(n^{-1/4})$ term that we already have.
The final term is the right tail
$$\int_{a}^{\frac{L+1}{\sqrt{n/12}}} f(x) dx$$
Observe that
$$\frac{L+1}{\sqrt{n/12}}= \frac{-\sqrt n/24+O(1)}{\sqrt{n/12}} = a + O(n^{-1/2})$$
Since $|f(x)| \le 1 \quad \forall x \in \mathbb R$, the right tail integral is $O(n^{-1/2})$
Adding all three error terms, we get the total difference between the sum and the integral is $O(n^{-1/4})$.
If we let S be the sum and I the integral, we have proved that $|S - I| = O(n^{-1/4})$. From this, we can easily get the expression that you want with $g(n)=n^{-1/4}$. The integral $I$ is independent of $n$ and is therefore $O(1)$. In fact, the paper that you linked shows that it is $\Phi(a)$ where $\Phi$ denotes the normal cumulative distribution function. So
$$S= I + (S-I)\\
= I + O(n^{-1/4})\\
= I + I\cdot O(n^{-1/4})/I \\
= I + I\cdot O(n^{-1/4})/O(1) \\
= I + I\cdot O(n^{-1/4}) \\
= I \cdot (1 + O(n^{-1/4})) $$
My thoughts are, that the division by $\sqrt{n}$ shapes g(n).
– tutoto Aug 12 '25 at 09:28