I was messing around in Desmos and typed this in: $\displaystyle{\sum_{n=1}^{floor(x)}\cos(n^2)}$
It produces this graph in the $XY$-plane (keep in mind the axis ratios):
It appears to produce a highly symmetrical, fractal-like graph. I tried replacing $n^2$ with $n$ to different powers, but found no other symmetry like this. Does anyone have any idea why this phenomenon occurs?
Edit: Doing some more investigation, I realized that the graph is symmetric about the lines $x=(2k+1)177.5$, for non-negative integers $k$. As for the significance of $177.5$, the only thing I have realized so far is that $177.5$ is very nearly $\frac{113\pi}{2}$, and thus $\cos(177.5)$ is very nearly $0$.
$XY$-plane" />
The near periodity of this part of the graph is due to the fact that $2\pi$, the period of $\cos x$, is very close to $\frac{710}{113}$. This means that when we plug in $n$ and $n+710$, the resulting squares are very close to each other modulo $2\pi$. However, note that this phenomenon does not last very long: