# Fractal Curves from Prime Trigonometric Series

^{1}

^{2}

^{*}

Next Article in Journal

Previous Article in Journal

NIKI Ltd. Digital Engineering, Research Center, 205 Ethnikis Antistasis Street, 45500 Katsika, Ioannina, Greece

TWT GmbH Science & Innovation, Mathematical Research, Ernsthaldenstr. 17, 70565 Stuttgart, Germany

Author to whom correspondence should be addressed.

Received: 10 November 2017
/
Revised: 26 December 2017
/
Accepted: 26 December 2017
/
Published: 3 January 2018

We study the convergence of the parameter family of series: ${V}_{\alpha ,\beta}(t)={\sum}_{p}{p}^{-\alpha}\mathrm{exp}(2\pi i{p}^{\beta}t)$ , $\alpha ,\beta \in {\mathbb{R}}_{>0},\phantom{\rule{0.277778em}{0ex}}t\in [0,1)$ defined over prime numbers p and, subsequently, their differentiability properties. The visible fractal nature of the graphs as a function of $\alpha ,\beta $ is analyzed in terms of Hölder continuity, self-similarity and fractal dimension, backed with numerical results. Although this series is not a lacunary series, it has properties in common, such that we also discuss the link of this series with random walks and, consequently, explore its random properties numerically.

The prime numbers are not randomly distributed but, there are random models that capture important properties of the distribution of prime numbers well (e.g., [1]). The random behavior of a deterministic mathematical object can be found elsewhere: there are classical function series that can be approximated by random processes. Let us briefly describe these series: consider the two functions ${f}_{n}(x)=\mathrm{sin}(2\pi nx)$ and ${f}_{n+1}(x)=\mathrm{sin}(2\pi (n+1)x)$ for an arbitrary integer $n\in \mathbb{N}$. These behave as strongly dependent random variables if we consider x to be a random real variable uniformly distributed on some interval. However, if one picks from the sequence of frequencies ${(2\pi nx)}_{n\ge 0}$ a sub-sequence ${(2\pi {n}_{k})}_{k\ge 0}$, such that the integer sequence grows sufficiently fast, i.e., $\raisebox{1ex}{${n}_{k+1}$}\!\left/ \!\raisebox{-1ex}{${n}_{k}$}\right.\ge 1+\rho ,\rho >0$, the quantities ${f}_{{n}_{k}}(x)$ and ${f}_{{n}_{k+1}}(x)$ behave like independent random variables (see Figure 1 as an example and Section 3).

Now, one can construct a random walk out of these random variables: start at zero. At time k, move ${f}_{{n}_{k}}(x)$ up. At time N, we find ourselves at $S(x,N)={\sum}_{k=0}^{N}{f}_{{n}_{k}}(x)$. This sum is displayed for $N=1000$ in Figure 2 on the left.

This example is known as a lacunary Fourier series, that is its frequencies fulfill the growth condition given above. Its random properties are a classical field of research. In the literature, the sequence of prime numbers ${(2\pi {p}_{k})}_{k\ge 0}$ is often cited as a counterexample for a sequence of frequencies that does not give rise to a lacunary Fourier series: it neither fulfills the growth condition nor alternative conditions on arithmetic patterns that exist in the literature. However, experiments in this article suggest that ${\sum}_{k}\mathrm{sin}(2\pi {p}_{k}x)$ share many of the random properties of lacunary series (see Figure 2 for a first impression or [2]): for instance, the central limit theorem seems to hold. Unfortunately, this looks difficult to prove (see e.g. [3], p. 2).

On the other hand, we can look at other manifestations of randomness in lacunary series (e.g., in the example in Figure 2) and try to see if they are also present in our prime series ${V}_{\alpha ,\beta}$: by introducing appropriate coefficients ${a}_{k}$, the walk ${\sum}_{k}{a}_{k}\mathrm{sin}(\pi {n}_{k}x)$ can be approximated by a Wiener process, which is an almost everywhere continuous random walk with independent normally-distributed increments (see [4] and Section 3). This implies directly many interesting properties for the series, e.g., the law of iterated logarithm holds. It would be interesting if a similar approximation exists for our series ${V}_{\alpha ,\beta}$. Again, we were not able to prove this.

However, we can show that our series ${V}_{\alpha ,\beta}$ has in fact for specific $\alpha ,\beta $ properties in common with a Wiener process, e.g., its regularity and fractality (see Section 2). The above-mentioned example ${\sum}_{k}{a}_{k}\mathrm{sin}({2}^{k}\pi x)$ is in fact famous for these reasons: it belongs to the family of Weierstrass functions ${F}_{a,b}(x)={\sum}_{n=0}^{\infty}{a}^{n}\mathrm{sin}({b}^{n}t)$, which have been extensively studied for its differentiability properties. Under certain conditions on $a,b$, this function is nowhere differentiable, but Hölder continuous.

Another historical example that is non-differentiable, but multifractal, is the Riemann function ${R}_{2}(x)={\sum}_{n=1}^{\mathrm{inf}}{n}^{-2}\mathrm{sin}({n}^{2}x)$. Note, that it is not a lacunary series as $\raisebox{1ex}{${(n+1)}^{2}$}\!\left/ \!\raisebox{-1ex}{${n}^{2}$}\right.\to 1$. With our prime series, we place ourselves in between these two historical examples with respect to the growth of its frequencies.

While prime sums are extensively studied in the context of the famous prime conjectures (e.g., for Vinogradov’s theorem and the like), we have not found a treatment of trigonometric series over prime numbers. The reason for this is most probably that these series do not have the necessary form to help to progress in the proofs of the prime conjectures where prime exponential sums play a dominant role. As mentioned above, these series have not been studied in the context of lacunary series as prime numbers neither grow fast enough nor have known arithmetic properties, which are necessary for a straightforward analysis.

By using the results of prime number theory, we are nevertheless able to show conditions on the differentiability and self-similarity of our prime series. Experimentally, we explore also its box dimension in dependence of $\alpha ,\beta $.

For most of our questions, we can restrict ourselves, without loss of generality, to the real part ${\sum}_{p}{p}^{-\alpha}\mathrm{cos}(2\pi {p}^{\beta}t)$ of the series, which we denote by ${V}_{\alpha ,\beta}(t)$, as well.

There are basically two factors that influence the smoothness and convergence of a function series ${\sum}_{k}{a}_{k}\mathrm{exp}(2\pi i{n}_{k}t)$ as ours:

- The faster the coefficients ${a}_{k}$ decrease for $k\to \infty $, the smaller is the influence of the higher frequencies. This implies that the series converges better and the resulting function is smoother.
- The faster the frequencies ${n}_{k}$ increase or, equivalently, the greater the gaps, the smaller the period of the oscillation becomes, so that one obtains more peaks and sinks in one interval, which increases the fractal character.

The nature of these influences, easily deduced, are also backed by the long history of studies on the following two families of functions (and derived families):

Let:
be the family of Weierstrass functions, which have been extensively studied. One knows the following:

$${F}_{a,b}(t)=\sum _{n=0}^{\infty}{a}^{n}\mathrm{cos}({b}^{n}t)$$

2. If $0<a<1<ab$, then ${F}_{a,b}$ is nowhere differentiable. Further, the Hölder exponent is a constant function $s=-\frac{\mathrm{log}a}{\mathrm{log}b}$, i.e., for all $t,{t}_{0}$, it holds:

$$\left|{F}_{a,b}(t)-{F}_{a,b}({t}_{0})\right|\le C{\left|t-{t}_{0}\right|}^{s}.$$

On the other hand, one has the family of Riemann’s functions (whose authorship by Riemann is apparently only confirmed by Weierstrass) defined by:
which has the following proven properties:

$${R}_{\alpha}(x)=\sum _{n=1}^{\infty}{n}^{-\alpha}\mathrm{cos}({n}^{2}x)$$

([5,7,8,9,10])**.** 1. If $0<\alpha \le \frac{1}{2}$, then the series is not a Fourier series of an ${L}^{1}$-function. If $0<\alpha <\frac{1}{2}$, then ${R}_{\alpha}$ converges at x if and only if $x=\frac{a}{q}$, where $a,q$ are coprime and four divides $q-2$.

2. If $\frac{1}{2}<\alpha <1$, then the series converges in p-norm to a ${L}^{p}$-function for $p<\frac{2}{1-\alpha}$.

3. If $\alpha =1$, then the series has bounded mean oscillation.

4. If $\alpha <\frac{5}{2}$, then ${R}_{\alpha}$ is not differentiable at any irrational value of x, and its Hausdorff dimension for $\frac{3}{2}\le \alpha \le \frac{5}{2}$ is equal to:

$${\mathrm{dim}}_{H}({R}_{\alpha})=\frac{9}{4}-\frac{\alpha}{2}.$$

If $\alpha =2$, then ${R}_{2}$ is differentiable at x if and only if $x=\frac{a}{q}$ where $a,q$ are coprime and four divides $q-2$.

5. If $\alpha =2$, the Hölder exponent is discontinuous everywhere. In fact, ${R}_{2}$ is a function with unbounded variation and multifractal.

In the following, we aim to give a similar description for our function series. Let us start with some preliminary definitions, which are necessary for what follows.

We call a function $f:\mathbb{R}\to \mathbb{C}$ locally Hölder continuous at ${x}_{0}\in \mathbb{R}$, if there exist $s\in (0,1]$ and $C,\u03f5>0$, such that:

$$\left|f(x)-f(y)\right|\le C{\left|x-y\right|}^{s},\phantom{\rule{1.em}{0ex}}\mathrm{for}\mathrm{all}\phantom{\rule{0.277778em}{0ex}}x,y\in {B}_{\u03f5}({x}_{0}).$$

We call the supremum of s for which these inequality holds at ${x}_{0}$ the local Hölder exponent.

Let $\varphi :\mathbb{R}\to \mathbb{C}$ be a smooth function with compact support $\mathrm{supp}(\varphi )\subset \mathbb{C}$. We write:
for the Fourier transform of $\varphi $. Further, let $\varphi :\mathbb{R}\to \mathbb{R}$ be given such that the support of its Fourier transform is contained in $[-1,1]$, then the Gabor wavelet transform of a function $f:\mathbb{R}\to \mathbb{C}$ is defined by:

$$\widehat{\varphi}(u)={\int}_{\mathbb{R}}\varphi (t)\mathrm{exp}(-iut)dt$$

$$G(a,b,\lambda )=\frac{1}{a}{\int}_{\mathbb{R}}f(t)\mathrm{exp}(-i\lambda t)\varphi \left(\frac{t-b}{a}\right)dt.$$

With these notation, we have the following estimation, which is a special case of Proposition 5 in [6]:

Let $f:\mathbb{R}\to \mathbb{C}$ be a bounded function. Let $G(a,b,\lambda )$ be the Gabor wavelet transform of f. If f is locally Hölder continuous at ${x}_{0}\in \mathbb{R}$ with Hölder coefficient s, then there exists $C>0$ such that for all $a\in (0,1]$ and for all $b\in \overline{{B}_{1}({x}_{0})}$ and for all $\lambda \ge {a}^{-1}$, we have:

$$\left|G(a,b,\lambda )\right|\le C{a}^{s}{\left(1+\frac{\left|{x}_{0}-b\right|}{a}\right)}^{s}.$$

In the spirit of the results in Section 2.1, we aim to determine which conditions have to be fulfilled by the coefficients and frequencies in our example in order to have a certain degree of differentiability. Firstly, we consider:
where f is any function of prime numbers. We can state the trivial fact that:

$${V}_{\beta}(n,t)=\sum _{p\le n}f(p)\mathrm{cos}(2\pi {p}^{\beta}t),\phantom{\rule{1.em}{0ex}}\beta >0,$$

For any $\beta \ge 0$, if ${\int}_{2}^{\infty}\frac{\left|f(x)\right|}{\mathrm{ln}(x)}dx<\infty $, then the partial sums ${V}_{\beta}(n,t)$ converge uniformly and absolutely to a continuous function denoted by ${V}_{\beta}$.

We have $\left|f(p)\mathrm{cos}(2\pi {p}^{\beta}t)\right|\le \left|f(p)\right|$ for all p. By the Weierstrass M-test, the partial sums ${V}_{\beta}(n,t)$ converge uniformly and absolutely if ${\sum}_{p}\left|f(p)\right|<\infty .$ Using the Riemann–Stieltjes integral and the prime number theorem, we get:
where $\pi (x)$ denotes the number of primes $\le x$, finishing the proof. ☐

$$\sum _{p}f(p)={\int}_{2}^{\infty}f(x)d\pi (x)={\int}_{2}^{\infty}\frac{f(x)}{\mathrm{ln}(x)}dx,$$

We take now
and denote with ${V}_{\alpha ,\beta}(t)$ its limit whenever it exists. Then, one can show the following statement:

$${V}_{\alpha ,\beta}(n,t)=\sum _{p\le n}{p}^{-\alpha}\mathrm{cos}(2\pi {p}^{\beta}t)$$

Let $\alpha \in \mathbb{R}$ and $\alpha >1$.

- Then, the series ${V}_{\alpha ,\beta}(n,t)$ converges uniformly and absolutely to a continuous function ${V}_{\alpha ,\beta}(t)$.
- For $m\ge 1$, if further $\alpha -m\beta >1$, then the function ${V}_{\alpha ,\beta}(t)$ is ${C}^{m}$, i.e., m-times continuously differentiable.

For the first result, we use the properties of the prime zeta function $P(\alpha )={\sum}_{p}{p}^{-\alpha}$: it converges absolutely for $\alpha >1,\alpha \in \mathbb{R},$ and diverges for $\alpha =1$ (see, e.g., [11,12]). The coefficients ${p}^{-\alpha}$ are an upper bound for the terms ${p}^{-\alpha}\mathrm{cos}\left(2\pi {p}^{\beta}t\right)$. Consequently, the Weierstrass M-test implies that for $\alpha >1$ and any $t\in [0,1)$, ${V}_{\alpha ,\beta}(n,t)$ converges uniformly and absolutely to ${V}_{\alpha ,\beta}(t)$. As any partial sum ${V}_{\alpha ,\beta}(n,t)$ is continuous, the limit is a continuous function, as well.

Secondly, for any n and t, we can differentiate the partial sums:

$$\begin{array}{cc}\hfill {V}_{\alpha ,\beta}^{\prime}(n,t)& =-2\pi \sum _{p\le n}{p}^{-\alpha +\beta}\mathrm{sin}(2\pi {p}^{\beta}t).\hfill \end{array}$$

This sequence of derivatives converges uniformly with the same argument as above for $\alpha -\beta >1$, so that one concludes that ${V}_{\alpha ,\beta}(t)$ is continuously differentiable itself with derivative ${V}_{\alpha ,\beta}^{\prime}(t)=-2\pi {\sum}_{p}{p}^{-\alpha +\beta}\mathrm{sin}(2\pi {p}^{\beta}t)$. By induction over m, one proves the m-time differentiability of the function. ☐

The result is in accordance with the intuitive smoothness of the series: for fixed $\alpha >1$, the series becomes smoother, the smaller the frequency ${p}^{\beta}$, $\beta \to 0$, or equivalently, the larger the period. Therefore, the peaks and sinks of the oscillation are more and more separated so that the series becomes smoother (see Figure 3, Figure 4 and Figure 5).

If $1<\alpha \le \beta +1$, then the function is Hölder continuous with Hölder coefficient $s\le \frac{\alpha}{\beta}$.

First of all, let $f:\mathbb{R}\to \mathbb{C}$ be an integrable function and $N>0$, then by using the Riemann–Stieltjes integral (see, e.g., [13]) and the prime number theorem as above, one knows:

$$\sum _{p\le N}{p}^{-\alpha}={\int}_{2}^{N}{x}^{-\alpha}d\pi (x)\sim {\int}_{2}^{N}\frac{1}{{x}^{\alpha}\mathrm{ln}(x)}dx.$$

From this formula and $\mathrm{li}(x)$ denoting the logarithmic integral function, one deduces (substituting $dx$ by $d\left({x}^{1-\alpha}\right)$) for $\alpha <1$:

$$\sum _{p\le N}{p}^{-\alpha}={(1-\alpha )}^{-1}\mathrm{li}\left({N}^{1-\alpha}\right)+\mathcal{O}\left({N}^{1-\alpha}\mathrm{exp}(-c\sqrt{\mathrm{ln}(N)}\right).\phantom{\rule{-4.0pt}{0ex}}$$

Approximating the logarithmic integral, this implies:

$$\sum _{p\le N}{p}^{-\alpha}\sim \frac{{N}^{1-\alpha}}{(1-\alpha )\mathrm{ln}(N)}.$$

If $\alpha >1$, we have to use the explicit formula for the prime zeta function to get an estimate for the speed of convergence (see, e.g., [14] for a derivation of the formula). We then have by partial summation:
where $\zeta (\alpha )={\sum}_{n=1}^{\infty}{n}^{-\alpha}$ denotes the Riemann zeta function and $\mu $ the Moebius function. Therefore, we get for the tail of the prime zeta function:

$$\begin{array}{cc}\hfill \sum _{p}{p}^{-\alpha}& =\sum _{p\le N}{p}^{-\alpha}+\sum _{n=1}^{\infty}\frac{\mu (n)}{n}\mathrm{ln}\left(\zeta (N,\alpha n)\right),\phantom{\rule{1.em}{0ex}}\mathrm{with}\hfill \\ \hfill \zeta (N,\alpha )& =\zeta (\alpha ){\mathsf{\Pi}}_{p\le N}\left(1-{p}^{-\alpha}\right),\hfill \end{array}$$

$$\begin{array}{cc}\hfill \sum _{p>N}{p}^{-\alpha}& =\sum _{n=1}^{\infty}\frac{\mu (n)}{n}\mathrm{ln}\left(\zeta (N,\alpha n)\right),\phantom{\rule{1.em}{0ex}}\mathrm{with}\hfill \\ \hfill \mathrm{ln}\left(\zeta (N,\alpha )\right)& =\mathcal{O}\left({N}^{-\alpha}\right)\phantom{\rule{1.em}{0ex}}\mathrm{and}\hfill \\ \hfill \sum _{n=1}^{\infty}\frac{\mu (n)}{n}& =0.\hfill \end{array}$$

Combining Equations (1) and (2) on the asymptotic of the prime zeta function, we can estimate now the regularity of our function ${V}_{\alpha ,\beta}(t)$.

For any $t,{t}_{0}\in [0,1)$, we choose $N={\left|t-{t}_{0}\right|}^{-\frac{1}{\alpha}}.$ Then, we have with the mean value theorem and using the absolute convergence of the series:

$$\begin{array}{cc}\hfill \left|{V}_{\alpha ,\beta}(t)-{V}_{\alpha ,\beta}({t}_{0})\right|& \le \sum _{p\le N}{p}^{-\alpha}\left|\mathrm{cos}(2\pi {p}^{\beta}t)-\mathrm{cos}(2\pi {p}^{\beta}{t}_{0})\right|+2\sum _{p>N}{p}^{-\alpha}\hfill \\ & \le \sum _{p\le N}{p}^{-\alpha +\beta}\left|t-{t}_{0}\right|+2\sum _{p>N}{p}^{-\alpha}\hfill \\ & \le \frac{{N}^{-\alpha +\beta +1}}{(\beta -\alpha +1)\mathrm{ln}(N)}\left|t-{t}_{0}\right|+2C{N}^{-\alpha}\hfill \\ & \le C{\left|t-{t}_{0}\right|}^{2-\frac{\beta +1}{\alpha}}.\hfill \end{array}$$

The exponent $1-\beta <2-\frac{\beta +1}{\alpha}\le 1$ is not necessarily optimal, but a lower bound. However, it suffices to conclude that the function is Hölder continuous, so that we can derive an upper bound for its Hölder exponent.

For this step, we use a method developed by Jaffard in [6], which relies on a wavelet transform and the idea of choosing the wavelet transform such that only one frequency of ${V}_{\alpha ,\beta}(t)$ is picked up. Let ${\theta}_{m}=\mathrm{min}\left\{{p}_{m}^{\beta}-{p}_{m-1}^{\beta},{p}_{m+1}^{\beta}-{p}_{m}^{\beta}\right\}$ and ${\Delta}_{m}={p}_{m}-{p}_{m-1}$.

We choose a function $\varphi $ whose Fourier transform $\widehat{\varphi}$ has compact support $\mathrm{supp}(\widehat{\varphi})\subset [0,1]$ and $\widehat{\varphi}(0)=1$. We then look at the Gabor-wavelet transform:
with $u={\theta}_{m}(t-{t}_{0})$. Substituting $\widehat{\varphi}(y)={\int}_{\mathbb{R}}\mathrm{exp}(iyu)\varphi (u)du$ for $y=\frac{\left({p}_{k}^{\beta}-{p}_{m}^{\beta}\right)u}{{\theta}_{m}}$ in the equation, we get:

$$\begin{array}{cc}\hfill {G}_{m}({\theta}_{m}^{-1},{t}_{0},{p}_{m}^{\beta})& ={\theta}_{m}\sum _{k}{p}_{k}^{-\alpha}{\int}_{\mathbb{R}}\mathrm{exp}\left(i\left({p}_{k}^{\beta}-{p}_{m}^{\beta}\right)t\right)\varphi \left({\theta}_{m}(t-{t}_{0})\right)dt\hfill \\ & =\sum _{k}{p}_{k}^{-\alpha}\mathrm{exp}\left(i\left({p}_{k}^{\beta}-{p}_{m}^{\beta}\right){t}_{0}\right){\int}_{\mathbb{R}}\mathrm{exp}\left(i\frac{\left({p}_{k}^{\beta}-{p}_{m}^{\beta}\right)}{{\theta}_{m}}\right)\varphi (u)du,\hfill \end{array}$$

$${G}_{m}({\theta}_{m}^{-1},{t}_{0},{p}_{m}^{\beta})=\sum _{k}{p}_{k}^{-\alpha}\mathrm{exp}\left(i\left({p}_{k}^{\beta}-{p}_{m}^{\beta}\right){t}_{0}\right)\widehat{\varphi}\left(\frac{\left({p}_{k}^{\beta}-{p}_{m}^{\beta}\right)u}{{\theta}_{m}}\right).$$

As the support of $\widehat{\varphi}$ is a subset of the unit interval, it vanishes for any $k\ne m$, so the expression is reduced to:

$${G}_{m}({\theta}_{m}^{-1},{t}_{0},{p}_{m}^{\beta})={p}_{m}^{-\alpha}$$

Recall that we have just proven that ${V}_{\alpha ,\beta}$ is locally Hölder continuous at ${t}_{0}\in \mathbb{R}$. Further, for all m, it is ${p}_{m}^{\beta}\ge {\theta}_{m}$ and ${\theta}_{m}^{-1}\in (0,1]$. Hence, applying Proposition 1, there exists $C>0$ such that for all $s\in (0,1)$:

$${G}_{m}({\theta}_{m}^{-1},{t}_{0},{p}_{m}^{\beta})={p}_{m}^{-\alpha}\le C{\theta}_{m}^{-s}.$$

The gap ${\theta}_{m}$ is bounded by ${p}_{m}^{\beta}$ from above, so that the Hölder coefficient s is bounded by $\frac{\alpha}{\beta}$ from above, finishing the proof. ☐

Let $\alpha >1$ be fixed. The bigger the gaps of the frequency, $\beta \to \infty $, the stronger the irregularity of ${V}_{\alpha ,\beta}(t)$.

The graph of the function ${V}_{\alpha ,\beta}$ seems to be self-similar for certain $\alpha ,\beta $. There seems to be an approximate scalar invariance at points ${q}^{-1}$, where q is prime. Let us make this intuition more precise: look for example at the partial sums ${V}_{1,1}(n,t)={\sum}_{p\le n}{p}^{-1}\mathrm{exp}(2\pi ipt)$ in Figure 6.

Denote by ${p}_{k}$ the k-th prime number. We restrict ourselves again to the real part of ${V}_{1,1}(n,t)$. The point $\frac{1}{2}$ is a global minimum as ${V}_{1,1}^{\prime}\left(n,\frac{1}{2}\right)=0$ and ${V}_{1,1}\left(n,\frac{1}{2}\right)=\frac{1}{2}-{\sum}_{k=1}^{n}{p}_{k}^{-1}$ as the primes greater than two are odd. Now, consider the point $\frac{1}{3}$: we have ${V}_{1,1}\left(n,\frac{1}{3}\right)=\frac{1}{3}-\frac{1}{2}{\sum}_{k=1,k\ne 2}^{n}{p}_{k}^{-1}$. More generally, one has:

$$\begin{array}{cc}\hfill {V}_{1,1}\left(n,\frac{1}{q}\right)& =\frac{1}{q}+\sum _{l=1}^{q-1}\left(\mathrm{cos}\left(\frac{2\pi l}{q}\right)\sum _{{p}_{k}=l\phantom{\rule{3.33333pt}{0ex}}\mathrm{mod}\phantom{\rule{0.277778em}{0ex}}q}^{n}{p}_{k}^{-1}\right),\phantom{\rule{1.em}{0ex}}q\phantom{\rule{0.277778em}{0ex}}\mathrm{prime}\hfill \\ & =\sum _{l=0}^{q-1}\mathrm{cos}\left(\frac{2\pi l}{q}\right){R}_{l,q}\hfill \end{array}$$

That is, we can decompose the partial sum into residue classes of the prime numbers and the roots of unity of cosine. One knows that the number of primes $p\le n$ that are congruent to $l\phantom{\rule{3.33333pt}{0ex}}\mathrm{mod}\phantom{\rule{0.277778em}{0ex}}q$ are approximately the same for all l, that is $\frac{n}{\mathsf{\Phi}(q)\mathrm{log}(n)}$, where $\mathsf{\Phi}(q)$ denotes the Euler totient function and is equal to $q-1$ for q prime. Therefore, for any $\frac{1}{q}$, q prime, one can use this distribution and the Riemann–Stieltjes integral to show that the difference between the sums ${\sum}_{{p}_{k}=l\phantom{\rule{3.33333pt}{0ex}}\mathrm{mod}\phantom{\rule{0.277778em}{0ex}}q,\phantom{\rule{0.166667em}{0ex}}{p}_{k}\le n}{p}_{k}^{-1}$ for each $l=1,\dots ,q-1$ converges to zero for $n\to \infty $, that is:

$$\begin{array}{cc}\hfill {R}_{l,q}& =\sum _{{p}_{k}=l\phantom{\rule{3.33333pt}{0ex}}\mathrm{mod}\phantom{\rule{0.277778em}{0ex}}q,\phantom{\rule{0.166667em}{0ex}}{p}_{k}\le n}{p}_{k}^{-1}\sim \frac{1}{q-1}{\int}_{2}^{n}\frac{1}{x\mathrm{ln}(x)}dx\hfill \\ & =\frac{1}{q-1}\left(\mathrm{ln}\mathrm{ln}(n)+C\right).\hfill \end{array}$$

The factors $\mathrm{cos}\left(\frac{2\pi l}{q}\right)$ are exactly the prime roots of unity, and the sum ${\sum}_{l=0}^{q-1}\mathrm{cos}\left(\frac{2\pi l}{q}\right)=0$. Consequently, one computes:

$$\begin{array}{cc}\hfill {V}_{1,1}\left(n,\frac{1}{q}\right)& \sim \frac{1}{q}-\frac{1}{q-1}\left(\mathrm{ln}\mathrm{ln}(n)+C\right).\hfill \end{array}$$

As we have ${V}_{1,1}(n,1)={\sum}_{p\le n}{p}^{-1}\sim \mathrm{ln}\mathrm{ln}(n)+M$, one could argue that:

$${V}_{1,1}(n,\frac{t}{q})\approx \frac{1}{1-q}{V}_{1,1}(n,t)+\frac{1}{q},\phantom{\rule{1.em}{0ex}}q\ge 3,\phantom{\rule{0.277778em}{0ex}}\mathrm{prime}.$$

See Figure 7. However, keep in mind that these are only asymptotic equivalences, while our partial sum ${V}_{1,1}(n,t)$ does not converge for all $t\in [0,1)$ for $n\to \infty $, so the self-similarity of the graph is certainly not strict.

Further, we compute numerically the box dimension of the graph of ${V}_{\alpha ,\beta}$ defined in the following way: let $A:=[a,b]\times [c,d]$ be the rectangle such that the graph ${V}_{\alpha ,\beta}(n,t)\subset A$ is contained. We compute then for $i,j=0,\dots N-1$ the intersections ${V}_{\alpha ,\beta}(n,t)\cap [a+i(b-a)/N,a+(i+1)(b-a)/N]\times [c+j(d-c)/N,c+(j+1)(d-c)/N]$. We denote the number of non-empty intersections by $M(N)$. The box dimension is then given by:

$${\mathrm{dim}}_{B}\left({V}_{\alpha ,\beta}(n,t)\right)=\underset{N\to \infty}{\mathrm{lim}}\frac{\mathrm{ln}(M(N))}{\mathrm{ln}(N)}.$$

In accordance with our results on the regularity of ${V}_{\alpha ,\beta}$, we obtain the following Figure 8 for the (numerically computed) box dimension ${\mathrm{dim}}_{B}$ over the fraction $\frac{\alpha}{\beta}$. For $\alpha >1$ fixed and $\beta \to \infty $, that is $\frac{\alpha}{\beta}\to 0$, we expect that the fractal dimension converges to two. On the other hand, for $\beta \to 0$, the fractal dimension should converge to one as the graph gets continuously differentiable if $\frac{\alpha -1}{\beta}>1+\frac{1}{\beta}$.

In recent literature (see, e.g., [15]), the concept of the fractal dimension of prime distribution is studied: it is defined with the help of an indicator function $S:\mathbb{N}\to \left\{0,1\right\}$ on the natural numbers, which is one if $n\in \mathbb{N}$ is prime, otherwise zero. The fractal dimension is then computed as the average number of ones in randomly-chosen minors $n\times n$ of the $N\times N$-matrix $S(\left\{n\le N\right\})\times S(\left\{n\le N\right\})$. In a recent publication ([16]), the self-similarity of these images (created by displaying the ones in the matrix in black, zeros in white) is also treated. These concepts are not related to the self-similarity or the fractal dimension of our series: the fractality of ${V}_{\alpha ,\beta}$ depends on its Hölder exponent, which relies on the exponents $\alpha ,\beta $ and on the gaps of frequencies $({p}^{\beta})$. In this sense, it certainly depends on the prime distribution, but we do not see a direct application of the concepts cited above. More probable is that in order to analytically compute the fractal dimension, one would have to use the large sieve inequality where on the right side would appear values of ${\sum}_{p}\frac{1}{{p}^{2\alpha}}$.

There is clearly no reverse correlation from the fractal dimension of the graph to the prime distribution as there are other, even multifractal curves as the cited Riemann function whose frequencies are not prime sequences.

The quite similar behavior of lacunary and random Fourier series allow us to think that it might be possible to capture the random character of the series ${V}_{\alpha ,\beta}$, which is the subject of this section. Let us briefly review what is known in the context of lacunary sequences and random variables.

The terms $(\mathrm{sin}{(2\pi kx)}_{k}$ and $(\mathrm{cos}{(2\pi kx)}_{k}$ behave like random variables, but strongly dependently. However, if one restricts the sequence of frequencies ${(2\pi k)}_{k\ge 0}$ to ${(2\pi {n}_{k})}_{k\ge 0}$ where the sequence ${({n}_{k})}_{k\ge 0}$ has sufficiently fast-growing gaps, i.e.,
then the sequences $\left(\mathrm{sin}(2\pi {n}_{k}x\right)$ behave like independent random variables. For example, one has:
where $\mathcal{N}(0,1)$ is the normal distribution. This was the main observation that has led to study the connections between lacunary and random Fourier series, most importantly the question of which are the optimal growth conditions on the sequence ${({n}_{k})}_{k}$ such that the sequence ${\left(f({n}_{k})\right)}_{k\ge 0}$ for general periodic measurable functions f with vanishing integral exhibits random properties (see the historical overview in [17]). By introducing weights ${a}_{k}$ that obey certain growth conditions themselves, one can recover several limit theorems in complete analogy with random variables. In particular, the Central Limit Theorem (CLT) and the Law of Iterated Logarithm (LIL) are true (see the results by Salem-Zygmund in [18,19], Erdös-Gál in [20] and Weiss in [21]). Further, it can be shown that the process can be approximated by a standard Brownian motion:

$$\frac{{n}_{k+1}}{{n}_{k}}\ge 1+\rho ,\phantom{\rule{1.em}{0ex}}\rho >0\phantom{\rule{0.277778em}{0ex}}(\mathrm{Hadamard}\mathrm{gap}\mathrm{condition}),$$

$$\frac{1}{\sqrt{N}}\sum _{k=1}^{N}\mathrm{sin}(2\pi {n}_{k}x)\to \mathcal{N}(0,1),$$

(Philipp-Stout [4])**.** Assume the Hadamard gap condition. Assume further that ${A}_{N}:=\sqrt{\frac{1}{2}{\sum}_{k=1}^{N}{a}_{k}^{2}}\to \infty $ and there exists $\delta >0$ such that ${\mathrm{lim}}_{N\to \infty}\frac{{a}_{N}}{{A}_{N}^{1-\delta}}=0$. Then, without changing the distribution of the process:
it can be redefined on a suitable probability space together with a Wiener process $\left\{W(t)\phantom{\rule{0.277778em}{0ex}}|\phantom{\rule{0.277778em}{0ex}}t\ge 0\right\}$ such that:

$$S(t,x)=\sum _{k\le t}{a}_{k}\mathrm{cos}(2\pi {n}_{k}x),\phantom{\rule{1.em}{0ex}}t\ge 0,$$

$$S(t,x)=W\left({A}_{t}\right)+\mathcal{O}\left({A}_{t}^{\frac{1}{2}-\rho}\right),\phantom{\rule{1.em}{0ex}}almostsurelyforsome\phantom{\rule{0.277778em}{0ex}}\rho 0.$$

While the Hadamard growth condition (4) for CLT can be weakened for general sequences ${({n}_{k})}_{k}$ (see [22]) for coefficients ${a}_{k}=1$ to the optimal growth condition $\frac{{n}_{k+1}}{{n}_{k}}\ge 1+\frac{{c}_{k}}{\sqrt{k}}$ with ${c}_{k}\to \infty $, one has observed that sequences with much slower growth can nevertheless satisfy the CLT if they fulfill certain arithmetic conditions, more precisely bounds on the number of solutions for the diophantine equation. Results in this direction started with Gaposhkin [23] and were recently sharpened by Berkes, Philipp and Tichy [24]. The difficulties with the prime sequence ${\left({p}_{k}\right)}_{k\ge 0}$ are on both sides: Firstly, while it is sure that the prime sequence is not a Hadamard sequence, neither precise lower, nor upper bounds for the prime gap ${p}_{k+1}-{p}_{k}$ are known. The best results for a lower bound that would be of interest for us do not hold for all $k\ge 0$, but only infinitely many. For the upper bound, it is proven by Goldston, Pintz and Yildirim ([25]) that $\mathrm{lim}{\mathrm{inf}}_{k\to \infty}\frac{{\Delta}_{k}}{\mathrm{log}{p}_{k}}=0.$ Secondly, there is no building law for prime numbers known, and the infinite recurrence of certain patterns like twin primes is only conjectured, but not completely proven. On the other hand, the random character of prime numbers is often invoked without being analytically established anywhere although the random model by Cramér [1] is widely used and reproduces some results very efficiently (but fails in other aspects, e.g., in forecasting the size of the prime gap). For the question on the convergence of functions $f({n}_{k})$, random models were also introduced (see, e.g., [26]). Obviously, this is a broad and intensively-studied mathematical subject where we do not dare to make contributions. Therefore, we stay more closely to our studied series.

Because of the reason mentioned above, we have not been able to show the central limit theorem for the random variables $\mathrm{sin}({p}_{k}x)$ or $\mathrm{cos}({p}_{k}x)$, the base of our series ${V}_{\alpha ,\beta}$. Nevertheless, numerical computations strongly suggest that the central limit theorem holds; see Figure 9: we took ${10}^{4}$ uniformly-distributed points x of the interval $\left[-\pi ,\pi \right]$ and computed the sample average $\frac{1}{N}{\sum}_{k=1}^{N}\mathrm{sin}({p}_{k}x)$ for $N=$ 78,498, that is, the number of primes $\le {10}^{6}$. We computed the histogram for the values of the sample average, which experimentally tends to a normal distribution as the size of the sample tends to infinity. To confirm this observation, we did the same computation for $\mathrm{sin}({p}_{k}^{\frac{3}{2}}x)$, see Figure 10.

The properties of the series ${V}_{\alpha ,\beta}$ that we have discussed in this article are intimately related to the distribution of prime numbers, and this was mostly due to the unanswered questions on prime numbers for which the analytical access to our series is limited. Therefore, knowledge about the distribution and bounds for the gaps of prime numbers would imply more or less directly the properties where we were restricted to a numerical approach.

Although the series might be reminiscent of the Riemann zeta function or other number-theoretical functions, we did not construct ${V}_{\alpha ,\beta}$ in this way and do not see a possibility to deduce it from any of them, besides from the trivial fact, that ${V}_{\alpha ,\beta}(0)$ is equal to the prime zeta function $P(\alpha )={\sum}_{p}{p}^{-\alpha}$. Furthermore, recall that we only consider $\alpha \in \mathbb{R}$, usually $\alpha >1$, so that no zeros of the Riemann zeta function come into the play for the scope of this article.

We would like to thank Juri Merger and Florian Pausinger for his helpful hints and questions.

D.V. conceived of and designed the experiments. D.V. and D.B. performed the experiments. D.V. and D.B. analyzed the data. D.B. wrote the paper.

The authors declare no conflict of interest.

- Cramér, H. On the order of magnitude of the difference between consecutive prime numbers. Acta Arith.
**1936**, 2, 23–46. [Google Scholar] [CrossRef] - Vartziotis, D.; Wipper, J. The fractal nature of an approximate prime counting function. Fractal Fract.
**2017**, 1, 10. [Google Scholar] [CrossRef] - Raseta, M. On the strong approximations of partial sums of f(nkx). arXiv, 2015; arXiv:1509.08138. [Google Scholar]
- Philipp, W.; Stout, W.F. Almost Sure Invariance Principles for Partial Sums of Weakly Dependent Random Variables; American Mathematical Society: Providence, RI, USA, 1975. [Google Scholar]
- Hardy, G.H. Weierstrass’s Non-Differentiable Function. Trans. Am. Math. Soc.
**1916**, 17, 301–325. [Google Scholar] - Jaffard, S. Pointwise and directional regularity of nonharmonic Fourier series. Appl. Comput. Harmon. Anal.
**2010**, 22, 251–266. [Google Scholar] [CrossRef] - Hardy, G.H.; Littlewood, J.E. Contributions to the arithmetic theory of series. Proc. Lond. Math. Soc.
**1913**, 2, 411–478. [Google Scholar] [CrossRef] - Gerver, J. The differentiability of the Riemann function at certain rational multiples of π. Am. J. Math.
**1970**, 92, 33–55. [Google Scholar] [CrossRef] - Gerver, J. More on the differentiability of the Riemann function. Am. J. Math.
**1970**, 93, 33–41. [Google Scholar] [CrossRef] - Chamizo, F.; Córdoba, A. Differentiability and dimension of some fractal Fourier series. Adv. Math.
**1996**, 142, 335–354. [Google Scholar] [CrossRef] - Landau, E.; Walfisz, A. Über die nichfortsetzbarkeit einiger durch dirichletsche reihen definierter funktionen. Rendiconti del Circolo Matematico di Palermo
**1920**, 44, 82–86. (In German) [Google Scholar] [CrossRef] - Fröberg, C.E. On the prime zeta function. BIT
**1968**, 8, 187–202. [Google Scholar] [CrossRef] - Rosser, J.; Schoenfeld, L. Approximate formulas for some functions of prime numbers. Ill. J. Math.
**1962**, 6, 64–94. [Google Scholar] - Cohen, H. High Precision Computation of Hardy-Littlewood Constants. 2000. Available online: https://www.math.u-bordeaux.fr/~hecohen/ (accessed on 1 January 2018).
- Cattani, C. Fractal patterns in prime numbers distribution. In Lecture Notes in Computer Science, Proceedings of the International Conference on Computational Science and Its Applications (ICCSA 2010), Fukuoka, Japan, 23–26 March 2010; Taniar, D., Gervasi, O., Murgante, B., Pardede, E., Apduhan, B.O., Eds.; Springer: Berlin/Heidelberg, Germany, 2010; Part II, pp. 164–176. [Google Scholar]
- Cattani, C.; Ciancio, A. On the fractal distribution of primes and prime-indexed primes by the binary image analysis. Phys. A Stat. Mech. Its Appl.
**2016**, 460, 222–229. [Google Scholar] [CrossRef] - Kahane, J.P. A century of interplay between taylor series, Fourier series and brownian motion. Bull. Lond. Math. Soc.
**1997**, 29, 257–279. [Google Scholar] [CrossRef] - Salem, R.; Zygmund, A. On lacunary trigonometric series. Proc. Natl. Acad. Sci. USA
**1947**, 33, 333–338. [Google Scholar] [CrossRef] [PubMed] - Salem, R.; Zygmund, A. On lacunary trigonometric series, II. Proc. Natl. Acad. Sci. USA
**1948**, 34, 54–62. [Google Scholar] [CrossRef] [PubMed] - Erdös, P.; Gál, I. On the law of iterated logarithm I + II. Indag. Math. (Proceedings)
**1955**, 58, 65–84. [Google Scholar] [CrossRef] - Weiss, M. The law of the iterated logarithm for lacunary trigonometric series. Trans. Am. Math. Soc.
**1959**, 91, 444–469. [Google Scholar] - Erdös, P. On trigonometric sums with gaps. Magyar Tud. Akad. Mat. Kutató Int. Közl
**1962**, 7, 37–42. [Google Scholar] - Gaposhkin, V.F. Lacunary series and independent functions. Uspekhi Matematicheskikh Nauk
**1966**, 21, 3–82. [Google Scholar] [CrossRef] - Berkes, I.; Philipp, W.; Tichy, R. Metric discrepancy results for sequences {nkx} and diophantine equations. In Diophantine Approximation: Festschrift for Wolfgang Schmidt; Springer: Vienna, Austria, 2008; pp. 95–105. [Google Scholar]
- Goldston, D.A.; Pintz, J.; Yildirim, C.Y. Primes in tuples I. Ann. Math.
**2009**, 170, 819–862. [Google Scholar] [CrossRef] - Schatte, P. On a law of iterated logarithm for sums mod 1 with applications to Benford’s law. Probab. Theory Relat. Fields
**1988**, 77, 167–178. [Google Scholar] [CrossRef]

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).