Fractal curves from prime trigonometric series

We study the convergence of the parameter family of series $$V_{\alpha,\beta}(t)=\sum_{p}p^{-\alpha}\exp(2\pi i p^{\beta}t),\quad \alpha,\beta \in \mathbb{R}_{>0},\; 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\"older continuity, self similarity and fractal dimension, backed with numerical results. We also discuss the link of this series to random walks and consequently, explore numerically its random properties.


Introduction
The prime numbers are not randomly distributed but, there are random models that capture well important properties of the distribution of prime numbers (e.g. [Cramér, 1936]). 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) = sin(2πnx) and f n+1 (x) = sin(2π(n + 1)x) for an arbitrary integer n ∈ N. These behave as strongly dependent random variables if we consider x to be a random real variable uniformly distributed on some interval. But if one picks from the sequence of frequencies (2πnx) n≥0 a sub sequence (2πn k ) k≥0 such that the integer sequence grows sufficiently fast, i.e. nk+1 /nk ≥ 1 + ρ, ρ > 0, the quantities f nk (x) and f nk +1 (x) behave like independent random variables (see Fig. 1 as an example and § 3). Now, one can construct a random walk out of these random variables: start at 0. At time k move f nk (x) up. At time N , we find ourselves at S(x, N ) = N k=0 f nk (x). This sum is displayed for N = 1000 in Fig. 2 on the left. Our 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πp k ) k≥0 is often cited as a counterexample for a sequence of frequencies which does not give rise to a lacunary Fourier series: it does neither fulfill the growth condition nor alternative conditions on arithmetic patterns which exist in the literature. However, experiments in this  article suggest that k sin(πp k x) share a lot of the random properties of lacunary series (see Fig. 2 for a first impression or [Vartziotis and Wipper, 2016]): for instance, the central limit theorem seems to hold. Unfortunately, this looks difficult to prove.
On the other hand, we can look at other manifestations of randomness in lacunary series (e.g. in the example in Fig. 2) and try to see if they are also present in our prime series V α,β : by introducing appropriate coefficients a k , the walk k a k sin(πn k x) can be approximated by a Wiener process which is an almost everywhere continuous random walk with independent normally distributed increments (see [Philipp and Stout, 1975] and § 3). This implies directly a lot of 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 α,β . Again, we were not able to prove this.
But we can show that our series V α,β has in fact for specific α, β properties in common with a Wiener process, e.g. its regularity and fractality (see § 2). The above-mentioned example k a k sin(2 k πx) is in fact famous for these reasons: It belongs to the family of Weierstrass functions F a,b (x) = ∞ n=0 a n 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 which is non-differentiable, but multifractal, is the Riemann function R 2 (x) = inf n=1 n −2 sin(n 2 x). Note, that it is not a lacunary series as (n + 1) 2 /n 2 → 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 have not 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 do neither grow fast enough nor do they have known arithmetic properties which are necessary for a straightforward analysis. By using 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 on α, β.
Remark 0.1. For most of our questions, we can restrict ourselves -without loss of generality -to the real part p p −α cos(2πp β t) of the series which we denote by V α,β (t), too.

Acknowledgement
We would like to thank the referee for his remarks and Florian Pausinger for his helpful hints and questions.

Convergence and differentiability
There are basically two factors which influence the smoothness and convergence of a function series k a k exp(2πin k t) as ours: (1) The faster the coefficients a k decrease for k → ∞, the smaller is the influence of the higher frequencies. This implies that the series converges better and the resulting function is smoother.
(2) The faster the frequencies n k increase or equivalently, the greater the gaps, the smaller gets the period of the oscillation so that one obtains more peaks and sinks in one interval which increases the fractal character.
2.1. Historical remarks. 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: Theorem 1 ( [Hardy, 1916], [Jaffard, 2010]).
(2) If 0 < a < 1 < ab, then F a,b is nowhere differentiable. Further, the Hölder exponent is a constant function s = − log a log b , i.e. for all t, t 0 it holds On the other hand, one has the family of Riemann's function (whose authorship by Riemann is apparently only confirmed by Weierstrass) defined by which has the following proven properties: Theorem 2 ( [Hardy, 1916], [Hardy and Littlewood, 1912], [Gerver, 1970a, Gerver, 1970b

,[Chamizo and Córd
If 0 < α ≤ 1 2 , then the series is not a Fourier series of a L 1 -function. If 0 < α < 1 2 , then R α converges at x if and only if x = a q , where a, q are coprime and 4 divides q − 2.
(4) If α < 5 2 , then R α is not differentiable at any irrational value of x, and its Hausdorff dimension for 3 2 ≤ α ≤ 5 2 is equal to If α = 2, then R 2 is differentiable at x if and only if x = a q where a, q are coprime and 4 divides q − 2. (5) If α = 2, the Hoelder 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: 2.2. Preliminary definitions. We call a function f : R → C locally Hölder continuous at x 0 ∈ R, if there exist s ∈ (0, 1] and C, > 0 such that We call the supremum of s for which these inequality holds at x 0 the local Hölder exponent. Let φ : R → C be a smooth function with compact support supp(φ) ⊂ C. We writê for the Fourier transform of φ. Further, let φ : R → 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 : R → C is defined by With these notation, we have the following estimation which is a special case of Proposition 5 in [Jaffard, 2010]: Proposition 2.1 (Jaffard). Let f : R → C be a bounded function. Let G(a, b, λ) be the Gabor wavelet transform of f . If f is locally Hölder continuous at x 0 ∈ R with Hölder coefficient s, then there exists C > 0 such that for all a ∈ (0, 1] and for all b ∈ B 1 (x 0 ) and for all λ ≥ a −1 we have In the spirit of the results in § 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 ln(x) dx < ∞, then the partial sums V β (n, t) converges uniformly and absolutely to a continuous function denoted by V β .
Proof. We have f (p) cos(2πp β t) ≤ |f (p)| for all p. By the Weierstrass M -test the partial sums V β (n, t) converges uniformly and absolutely if p |f (p)| < ∞. Using the Riemann-Stieltjes Integral and the Prime number theorem we get where π(x) denotes the number of primes ≤ x finishing the proof.
We take now and denote with V α,β (t) its limit whenever it exists. Then one can show the following statement: Theorem 3. Let α ∈ R and α > 1.
(1) Then the series V α,β (n, t) converges uniformly and absolutely to a continu- times continuously differentiable.
Proof. For the first result we use the properties of the prime zeta function P (α) = p p −α : it converges absolutely for α > 1, α ∈ R, and diverges for α = 1 (see e.g. [Landau and Walfisz, 1920], [Fröberg, 1968]). The coefficients p −α are an upper bound for the terms p −α cos 2πp β t . Consequently, the Weierstrass M -test implies that for α > 1 and any t ∈ [0, 1), V α,β (n, t) converges uniformly and absolutely to V α,β (t). As any partial sum V α,β (n, t) is continuous, the limit is a continuous function, too. Secondly, for any n and t we can differentiate the partial sums This sequence of derivatives converges uniformly with the same argument as above for α − β > 1, so that one concludes that V α,β (t) is continuously differentiable itself with derivative V α,β (t) = −2π p p −α+β sin(2πp β t). By induction over m, one proves the m-time differentiability of the function.
Remark 3.1. The result is in accordance with the intuitive smoothness of the series: for fixed α > 1, the series gets the smoother, the smaller the frequency p β , β → 0, or equivalently, the larger the period. Therefore, the peaks and sinks of the oscillation are more and more separated so that the series gets smoother (see Fig. 3-5).
Theorem 4. If 1 < α ≤ β + 1, then the function is Hölder continuous with Hölder coefficient s ≤ α β . Proof. First of all, let f : R → C be an integrable function and N > 0, then by using the Riemann-Stieltjes integral (see e.g. [Rosser and Schoenfeld, 1962]) and the Prime number theorem as above one knows From this formula and li(x) denoting the logarithmic integral function, one deduces (substituting dx by d x 1−α ) for α < 1 Approximating the logarithmic integral this implies .  If α > 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. [Cohen, 2000] for a derivation of the formula). We then have by partial summation where ζ(α) = ∞ n=1 n −α denotes the Riemann zeta function and µ the Moebius function. So we get for the tail of the prime zeta function Combining Eq. (1)-(2) on the asymptotic of the prime zeta function, we can estimate now the regularity of our function V α,β (t). For any t, t 0 ∈ [0, 1), we choose N = |t − t 0 | − 1 α . Then we have with the mean value theorem and using the absolute convergence of the series The exponent 1 − β < 2 − β+1 α ≤ 1 is not necessarily optimal, but a lower bound. But 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 [Jaffard, 2010] which relies on a wavelet transform and the idea to choose the wavelet transform such that only one frequency of V α,β (t) is picked up. Let θ m = min p β m − p β m−1 , p β m+1 − p β m and ∆ m = p m − p m−1 . We choose a function φ whose Fourier transformφ has compact support supp(φ) ⊂ [0, 1] andφ(0) = 1. We then look at the Gabor-wavelet transform As the support ofφ is a subset of the unit interval, it does vanish for any k = m, so the expression it reduced to Recall that we have just proved that V α,β is locally Hölder continuous at t 0 ∈ R.
Further, for all m it is p β m ≥ θ m and θ −1 m ∈ (0, 1]. Hence, applying Proposition 2.1, there exists C > 0 such that for all s ∈ (0, 1) The gap θ m is bounded by p β m from above so that the Hölder coefficient s is bounded by α β from above finishing the proof. Remark 4.1. Let α > 1 be fixed. The bigger the gaps of the frequency, β → ∞, the stronger the irregularity of V α,β (t).
2.4. Self similarity and fractal dimension. The graph of the function V α,β seems to be self similar for certain α, β. There seems to be an approximate scalar invariance a points q −1 , where q is prime. Let us make more precise this intuition: look for example on the partial sums V 1,1 (n, t) = p≤n p −1 exp(2πipt) in Fig. 6: Denote by p k the kth prime number. We restrict ourselves again to the real part of V 1,1 (n, t). The point 1 2 is a global minimum as V 1,1 n, 1 2 = 0 and V 1,1 n, 1 2 = Figure 6. Graph of V 1,1 (10 5 , t) at 5 * 10 4 discrete points.
1 2 − n k=1 p −1 k as the primes greater than 2 are odd. Now, consider the point 1 3 : we have V 1,1 n, 1 3 = 1 3 − 1 2 n k=1,k =2 p −1 k . More generally, one has V 1,1 n, 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 ≤ n that are congruent to l mod q are approximately the same for all l, that is, where Φ(q) denotes the Euler totient function and is equal to q − 1 for q prime. So for any 1 q , q prime, one can use this distribution and the Riemann-Stieltjes integral to show that the difference between the sums pk=l mod q, pk≤n p −1 k for each l = 1, . . . , q − 1 converges to zero for n → ∞, that is: (ln ln(n) + C) . . The graph of the real part of − 1 2 V 1,1 (10 6 , t) (in black) and V 1,1 (10 6 , t/3) + 1 3 (in grey).
The factors cos 2πl q are exactly the prime roots of unity and the sum q−1 l=0 cos 2πl q = 0. Consequently, one computes (ln ln(n) + C) .
As we have V 1,1 (n, 1) = p≤n p −1 ∼ ln ln(n) + M , one could argue that see Fig. 7. But keep in mind that these are only asymptotic equivalences while our partial sum V 1,1 (n, t) do not converge for n → ∞, so the self similarity of the graph is certainly not strict.
2.4.1. Fractal dimension of V α,β . Further, we compute numerically the box dimension of the graph of V α,β defined in the following way: be the rectangle such that the graph V α,β (n, t) ⊂ A is contained. We compute then We denote the number of non-empty intersections by M (N ). The box dimension is then given by dim B (V α,β (n, t)) = lim N →∞ ln(M (N )) ln(N ) .
In accordance to our results on regularity of V α,β we obtain the following Fig. 8 for the (numerically computed) box dimension dim B over the fraction α β . For α > 1 fixed and β → ∞, that is, α β → 0, we expect that the fractal dimension converges to 2. On the other hand, for β → 0, the fractal dimension should converge to 1 as the graph gets continuously differentiable if α−1 β > 1 + 1 β .

Random properties for V α,β
The quite similar behavior of lacunary and random Fourier series let us think that it might be possible to capture the random character of the series V α,β which is the subject of this section. Let us briefly review what it is known in the context of lacunary sequences and random variables: 3.1. Lacunary sequences behaving as independent random variables: short overview. The terms (sin(2πkx) k and (cos(2πkx) k behave like random variables, but strongly dependently. But if one restricts the sequence of frequencies (2πk) k≥0 to (2πn k ) k≥0 where the sequence (n k ) k≥0 has sufficiently fast growing gaps, i.e.
(4) n k+1 n k ≥ 1 + ρ, ρ > 0 (Hadamard gap condition), then the sequences (sin(2πn k x) behave like independent random variables. For example, one has where N (0, 1) is the normal distribution. This was the main observation which has led to study the connections between lacunary and random Fourier series, most importantly the question which are the optimal growth conditions on the sequence (n k ) k such that the sequence (f (n k )) k≥0 for general periodic measurable functions f with vanishing integral exhibits random properties (see historical overview [Kahane, 1997]). By introducing weights a k which obey certain growth conditions themselves, one can recover several limit theorems in complete analogy to random variables. In particular, the Central Limit Theorem (CLT) and the Law of Iterated Logarithm (LIL) are true (see results by Salem-Zygmund in [Salem and Zygmund, 1947], [Salem and Zygmund, 1948], Erdös-Gál in [Erdös and Gál, 1955] and Weiss in [Weiss, 1959]). Further, it can be shown that the process can be approximated by a standard Brownian motion: Theorem 5 (Philipp-Stout [Philipp and Stout, 1975] it can be redefined on a suitable probability space together with a Wiener process W (t) t ≥ 0 such that , almost surely for some ρ > 0.
While the Hadamard growth condition (4) for CLT can be weakened for general sequences (n k ) k (see [Erdös, 1962]) for coefficients a k = 1 to the optimal growth condition nk +1 nk ≥ 1 + ck √ k with c k → ∞, 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 ( [Gaposhkin, 1966]) and were recently sharpened by Berkes, Philipp and Tichy ([Berkes et al., 2008]). The difficulties with the prime sequence (p k ) k≥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 which would be of interest for us do not hold for all k ≥ 0 but only infinitely many. For the upper bound it is proved by Goldston, Pintz and Yildirim ([D. Goldston and Yildirim, 2009]) that lim inf k→∞ ∆k log pk = 0. Secondly, there is no building law for prime numbers known and the infinite recurrence of certain patterns like twin primes are only conjectured but not completely proved. 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 ([Cramér, 1936]) is widely used and reproduces some results very efficiently (but fail in other aspects, e.g. in forecasting the size of the prime gap). In the question on convergence of functions f (n k ) random models were also introduced (see e.g. [Schatte, 1988]). 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: 3.2. The central limit theorem. Because of the reason mentioned above we have not been able to show the central limit theorem for the random variables sin(πp k x) or cos(πp k x), the base of our series V α,β . Nevertheless, numerical computations strongly suggest that the central limit theorem holds, see Fig. 9: we took 10 4 uniformly distributed points x of the interval − π 2 , π 2 and computed the sample average 1 N N k=1 sin(p k x) for N = 78498, that is, the number of primes ≤ 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.

Concluding remarks
The properties of the series V α,β which we have discussed in this article are intimately related to the distribution of prime numbers, and it was mostly due to the unanswered questions on prime numbers that the analytical access to our series is limited. Therefore, knowledge on the distribution and bounds for the gaps of prime numbers would imply more or less directly properties where we were restricted to a numerical approach.
Although the series might remind of the Riemann zeta function or other numbertheoretical functions, we did not construct V α,β in this way and do not see a possibility to deduce it from any of them, besides from the trivial fact, that V α,β (0) is equal to the prime zeta function P (α) = p p −α .