Fractal behavior along the boundary of convergence?

The complex power series $$\sum_{n=1}^{\infty}\frac{z^{n^2}}{n^2}$$ has radius $1$ (Ratio Test) and is absolutely convergent along $|z|=1$. Recalling something that my calculus professor (Ray Mayer, emeritus of Reed College) showed me 15 years ago, I started looking at a "graph" of this function. More precisely, here are plots of the images of $z$ with constant magnitude under this power series.

graph of the fractal

(The mapped curves are the images of $|z|=1$, $|z|=0.9$, and $|z|=0.8$. At the far right you can see $\sum\limits_{n=1}^{\infty}\frac1{n^2}=\frac{\pi^2}{6}$.)

So... what the heck is going on with the fractal behavior of the image of the boundary? Is there any understanding of this kind of behavior from power series? For instance, rotating $z$ by some angles might leave you with roughly the original series after a bit of rotation, scaling and translation. But I haven't been able to see how that would all come together.

I have a hunch that the "berries" along the inside of the leaf happen around values of $z$ with interesting arguments, but I haven't sat down to map out what those arguments might be.


EDIT: Indeed, the "leaftips" and "berries" seem to happen at regular $z$ values. Starting at the largest leaftip in quadrant I and moving clockwise, the leaftips are the images of $\exp\left(\frac{\pi}{2}i\right), \exp\left(\frac{\pi}{4}i\right), \exp\left(\frac{\pi}{6}i\right)$,... Similarly, starting from the largest berry and moving clockwise the "seeds" of the berries are the images of $\exp\left(\frac{\pi}{3}i\right), \exp\left(\frac{\pi}{5}i\right), \exp\left(\frac{\pi}{7}i\right)$,...

It appears that the "arc" from the large berry in quadrant IV to the large berry in quadrant I is parametrized by $\exp(it)$ with $t\in\left(-\frac{\pi}{3},\frac{\pi}{3}\right)$. Further, that the large leaf in quadrant I that crosses into quadrant II is parametrized by $t\in\left(\frac{3\pi}{7},\frac{3\pi}{5}\right)$. These two sections (and indeed any of the "leaves", "subleaves", etc.) ought to be similar in the fractal sense.


Let $f(z) = \sum_{n=1}^\infty \frac{z^{n^2}}{n^2}$. Separate this into the parts with odd $n$ and even $n$: $f_o(z) = \sum_{n \text{ odd}} \frac{z^{n^2}}{n^2}$, $f_e(z) = \sum_{n \text{ even}} \frac{z^{n^2}}{n^2} = f(z^4)/4$. Thus $$f(z) = \sum_{j=0}^\infty f_o(z^{4^j})/4^j = f_o(z) + \frac{f_o(z^4)}{4} + \frac{f_o(z^{16})}{16} + \ldots$$ The plot of $f_o(e^{it})$ for $0 \le t \le 2 \pi$ looks like this:

enter image description here

To produce the plot of $f(e^{it})$, think of a point going around the plot of $f_o$, and then a second describing a similar motion around that point but with 4 times the speed and 1/4 the scale, a third going around the second with $4^2$ times the speed and $1/4^2$ the scale of the original, etc.

The symmetry of the graph of $f_o$ is due to the fact that $f_o(e^{i\pi/4} z) = e^{i\pi/4} f_o(z)$ as well as $f_o(\overline{z}) = \overline{f_o(z)}$.

$f_o$ itself can be separated into parts for $n \equiv 0 \mod 3$ and $n \equiv 1 \text{ or } 2 \mod 3$: if $g = \sum_{n \equiv 1 \text{ or } 5 \mod 6} z^{n^2}/{n^2}$, we have $$f_o(z) = \sum_{j=0}^\infty g(z^{9^j})/9^j = g(z) + \frac{g(z^9)}{9} + \frac{g(z^{81})}{81} + \ldots $$

The plot of $g(e^{it})$ looks like this:

enter image description here

with symmetry coming from the fact that $g(e^{i\pi/12} z) = e^{i\pi/12} g(z)$.