Next Article in Journal
A Fractional-Order Infectivity and Recovery SIR Model
Previous Article in Journal
From Circular to Bessel Functions: A Transition through the Umbral Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

The Fractal Nature of an Approximate Prime Counting Function

by
Dimitris Vartziotis
1,2,* and
Joachim Wipper
3
1
Department of Mathematical Research, TWT GmbH Science & Innovation, Ernsthaldenstraße 17, 70565 Stuttgart, Germany
2
Research Center, NIKI Ltd. Digital Engineering, Ethnikis Antistasis 205, Katsikas, 45500 Ioannina, Greece
3
TRUMPF Werkzeugmaschinen GmbH + Co. KG, Johann-Maus-Straße 2, 71254 Ditzingen, Germany
*
Author to whom correspondence should be addressed.
Fractal Fract. 2017, 1(1), 10; https://doi.org/10.3390/fractalfract1010010
Submission received: 20 October 2017 / Revised: 31 October 2017 / Accepted: 3 November 2017 / Published: 8 November 2017

Abstract

:
Prime number related fractal polygons and curves are derived by combining two different aspects. One is an approximation of the prime counting function build on an additive function. The other is prime number indexed basis entities taken from the discrete or continuous Fourier basis.

1. Introduction

The present work describes the results of a numerical experiment based on the approximate prime counting function presented in [1]. By searching for a visual representation for the distribution of primes different to the well known staircase plots of the prime counting function, the authors used regular polygons and their relation to prime numbers as described in [2]. In doing so, fractal polygons and curves have been derived which will be presented in the following.
The distribution of prime numbers is one of the central problems in analytic number theory. Here, the prime counting function π ( x ) , giving the number of primes less or equal to x R , is of special interest. As stated in [3]: when the large-scale distribution of primes is considered, it appears in many ways quite regular and obeys simple laws. One of the first central results regarding the asymptotic distribution of primes is given by the prime number theorem, providing the limit
lim x π ( x ) x / ln x = 1 ,
which was proved independently in 1896 by Jacques Salomon Hadamard and Charles-Jean de La Vallée Poussin. Both proofs are based on complex analysis using the Riemann zeta function ζ ( s ) : = n = 1 1 / n s , with s C and the fact that ζ ( s ) 0 for all s : = 1 + i y , y > 0 .
An improved approximation of π ( x ) is given by the Eulerian logarithmic integral
Li ( x ) : = 2 x d t ln t .
This result was first mentioned by Carl Friedrich Gauß in 1849 in a letter to Encke refining the estimate n / ln ( n ) of π ( n ) given by the only 15 years old Gauß in 1792. This conjecture was also stated by Legendre in 1798.
In 2007 Terence Tao gave an informal sketch of proof in his lecture “Structure and randomness in the prime numbers” as follows [4]:
  • Create a “sound wave” (or more precisely, the von Mangoldt function) which is noisy at prime number times, and quiet at other times. [...]
  • “Listen” (or take Fourier transforms) to this wave and record the notes that you hear (the zeroes of the Riemann zeta function, or the “music of the primes”). Each such note corresponds to a hidden pattern in the distribution of the primes.
In the same spirit, the present work tries to paint a picture of the primes. By combining an alternative approximation of the prime counting function π ( x ) based on an additive function as proposed in [1] with prime number related Fourier polygons used in the context of regularizing polygon transformations as given in [2,5], fractal prime polygons and fractal prime curves are derived.
Three types of structures in the distribution of prime numbers are distinguished in [6]. The first is local structure, like residue classes or arithmetic progression [7]. The second is asymptotic structure as provided by the prime number theorem. The third is statistical structure as described for example in [8] reporting an empirical evidence of fractal behavior in the distribution of primes or [9] describing fractal fluctuations in the spacing intervals of adjacent prime numbers generic to diverse dynamical systems in nature. Quasi self similar structures in the distribution of differences of prime-indexed primes with scaling by prime-index order have been observed in [6]. The distribution of primes and prime-indexed primes is studied in [10] by mapping primes into a binary image. It is observed that the recurrence plots of prime distribution are similar to the Cantor dust. In the present work, the asymptotic structure becomes visually apparent by the given fractals.

2. Approximations of the Prime Counting Function

This section presents briefly the prime counting function and its classic approximations. Furthermore, an approximate prime counting function based on an additive function is described which yields the starting point in deriving prime related fractals.
Let N : = { 1 , 2 , 3 , } denote the set of natural numbers, N 0 : = N { 0 } , and p k the kth prime number with k N , i.e., p 1 := 2, p 2 := 3, p 3 := 5, etc. For x R , the prime counting function is defined as
π ( x ) : = 0 if x < 2 , max { k N | p k x } else .
According to the prime number theorem, π ( x ) can be approximated by x / ln ( x ) , i.e., (1) holds which will be denoted as π ( x ) x / ln ( x ) . An improved approximation is given by the Eulerian logarithmic integral (2), i.e., π ( x ) Li ( x ) . The graphs of the prime counting function and its two approximations are depicted in Figure 1 for x [ 0 , 100 ] .
An alternative approximation of π ( x ) is proposed in [1]. Its definition is based on an additive function which will be given in the following. Each n N { 1 } can be written as prime factorization n = k I ( n ) p k α k ( n ) with the prime numbers p k and their associated multiplicities α k ( n ) N . Here, I ( n ) denotes the index set of the prime numbers which are part of the factorization of n. For example, for 50 = 2 1 · 5 2 it holds that I ( n ) = { 1 , 3 } and α 1 ( 50 ) = 1 , α 3 ( 50 ) = 2 .
An additive function β α : N N 0 is given by the sum of all prime factors multiplied by their associated multiplicities, i.e.,
β α ( n ) : = 0 for n = 1 , k I ( n ) α k ( n ) p k otherwise .
Here, additive function means that n 1 , n 2 N implies β α ( n 1 n 2 ) = β α ( n 1 ) + β α ( n 2 ) . Furthermore, for prime numbers it follows readily that β α ( p k ) = p k , k N . The arithmetic properties of the function β α ( n ) are discussed in [11]. Here, this function, also known as integer logarithm, is denoted as A ( n ) .
Summing β α ( n ) for all n less or equal to a given real number x > 0 and applying proper scaling leads to the definition of
β α δ ( x ) : = 12 π 2 x n N , n x β α ( n ) .
The graph of β α δ ( x ) is depicted red in Figure 1. As a central result, it has been shown in [1] that β α δ ( x ) π ( x ) which is due to the representation
B α ( x ) : = n N , n x β α ( n ) = π 2 12 x 2 ln x + O x 2 ln 2 x .
This approximation of the prime counting function provides the first ingredient for deriving prime related fractals. The second ingredient is given by the following section.

3. Polygon Transformations and Fourier Polygons

Regular polygons and their relation to prime numbers are described in [2] in the context of regularizing polygon transformations. Such transformations, also generalized in [5], are based on constructing similar triangles on the sides of the polygon to transform. By iteratively applying the transformation, regular polygons are obtained for specific choices of the transformation parameters. Here, a point of a planar polygon can be represented by a complex number, the polygon itself by a vector of complex numbers. As is described briefly in this section, regularizing transformations can be represented by circulant matrices. Hence they are diagonalizable by the discrete Fourier matrix and the limit polygons are linear combinations of column vectors of the discrete Fourier matrix. These column vectors represent regular polygons which are denoted as Fourier polygons. This section gives a short introduction to regularizing polygon transformations and the theoretical background which builds the foundation for a specific choice of basis functions in finding an alternative geometric representation for visualizing polygons and curves related to the distribution of primes.
For a given n N , n 3 , let z = ( z 0 , , z n 1 ) t C n denote an arbitrary polygon in the complex plane. In the following, all indices have to be taken modulo n. In the first transformation substep, the similar triangles constructed on each directed side z k z k + 1 , k { 0 , , n 1 } , of the polygon are parameterized by a prescribed side subdivision ratio λ ( 0 , 1 ) and a base angle θ ( 0 , π / 2 ) . This is done by constructing the perpendicular to the right of the side at the subdivision point λ z k + ( 1 λ ) z k + 1 . On this perpendicular, a new polygon vertex z k + 1 is chosen in such a way that the triangle side z k z k + 1 and the polygon side z k z k + 1 enclose the prescribed angle θ . This is depicted on the left side of Figure 2 for an initial polygon with vertices z k marked black. The construction of the first transformation substep leads to a new polygon with vertices z k marked blue. The subdivision points, located on the edges of the initial polygon, are marked by white circles, the associated perpendiculars by dashed lines, and the angles θ by grey arcs. In the given example, the transformation parameters have been set to λ = 1 / 3 and θ = π / 5 .
The rotational effect of the first transformation substep is compensated by applying a second transformation substep with flipped similar triangles as is depicted on the right side of Figure 2. Starting from the vertices z k of the first transformation substep marked blue, this results in the polygon with vertices z k depicted red. As has been shown in [5], for w : = λ + i ( 1 λ ) tan θ , the new polygon vertices obtained by applying these two substeps are given by
z k + 1 : = w z k + ( 1 w ) z k + 1 and z k : = ( 1 w ¯ ) z k + w ¯ z k + 1 ,
respectively, where w ¯ denotes the complex conjugate of w. Both substeps are linear mappings in C n and the combined mapping is given by the matrix representation
z = M z , where M j , k : = | 1 w | 2 + | w | 2 if j = k , w ( 1 w ¯ ) if j = k + 1 , w ¯ ( 1 w ) if k = j + 1 , 0 otherwise ,
with j , k { 0 , , n 1 } .
The transformation matrix M is circulant and Hermitian [5]. Hence, with r : = exp ( 2 π i / n ) denoting the nth root of unity, it holds that M is diagonalized by the n × n unitary discrete Fourier matrix
F : = 1 n r 0 · 0 r 0 · ( n 1 ) r ( n 1 ) · 0 r ( n 1 ) · ( n 1 )
with entries F j , k = r j k / n and zero-based indices j , k { 0 , , n 1 } [12].
Let z ( ) : = M z denote the polygon obtained by applying the transformation times. If tends to infinity, the shape of the scaled limit polygon z ( ) depends on the dominating eigenvalue of M and the associated column of F. In the following, such a kth column of F is denoted as the kth Fourier polygon, i.e.,
f k : = r 0 · k , , r ( n 1 ) · k t , k { 0 , , n 1 } .
Hence, the Fourier polygons are the prototypes of the limit polygons obtained by iteratively applying M. A full classification of these limit polygons with respect to the choice of the transformation parameters λ and θ is given in [5]. Such transformations leading to regular polygons can for example be used in finite element mesh smoothing [13]. Furthermore, similar smoothing schemes can also be applied to volumetric meshes. Here, transformations can for example be based on geometric constructions [14] or on the gradient flow of the mean volume [15].
For n = 4 , the four Fourier polygons are depicted in the upper row of Figure 3. Since the jth vertex of f k is the j k th power of r, f 0 consists of four times the vertex 1 + 0 i , as is indicated by the blue point and the vertex label 0–3. The unit circle is marked by a dashed line, the roots of unity by white circle markers. As can be seen, f 1 is the regular counterclockwise oriented quadrilateral, f 2 a doubled segment with vertex multiplicity two.
In contrast to the case n = 4 , there is no degenerate polygon in the case n = 5 except that for k = 0 , as is shown in the lower row of Figure 3. Since the kth Fourier polygon is derived by iteratively connecting each kth vertex defined by the unit roots, and n = 5 is a prime number, each polygon vertex has multiplicity one. That is, in the case of prime numbers, all f k are either regular n-gons or star shaped n-gons if k > 0 . This relation between iterative polygon transformation limits and prime numbers is also analyzed in [2]. Furthermore, the roots of unity form a cyclic group under multiplication. For a given number n and each prime number p n , there is an associated Fourier polygon f p 1 defined by (9). This is the second ingredient in defining prime counting function related fractals.

4. Deriving Prime Fractals

The graph of the approximate prime counting function β α δ ( x ) depicted in Figure 1 gives only an impression for small values of x. Furthermore, it is not suitable to reveal more insight into the inner structure of prime numbers and their distribution. In search for such a graphical representation, a combination of the approximate prime counting function and Fourier polygons is considered in the following.
The main ingredient of the approximate prime counting function β α δ given by (5) is its scaled counterpart B α ( x ) given by (6). For x N { 1 } , this sum can be written as
B α ( n ) = k = 2 n β α ( k ) = k = 2 n j I ( k ) α j ( k ) p j = k N , p k n j = 1 log p k n n p k j = : w k ( n ) p k ,
where · denotes the floor function. That is, B α ( n ) is a weighted sum of prime numbers. The latter representation can be obtained by collecting all coefficients in the sum on the left side of (10) for each prime number p k using a sieve of Eratosthenes based argument.
The key to prime fractals is to replace the prime numbers p k in the representation of B α ( n ) according to (10) by prime number associated Fourier polygons. This leads to the polygonal prime fractal
F p ( n ) : = k N , p k n w k ( n ) f p k 1 ,
with f k denoting the Fourier polygon according to (9). Here, the Fourier polygon index p k 1 consists of the kth prime number subtracted by one, since zero based indices are used in the discrete Fourier transformation scheme.
For n = 10 4 , the polygonal prime fractal F p ( 10 4 ) is depicted in Figure 4. It is a linear combination of π ( 10 4 ) = 1229 Fourier polygons f p k 1 , each weighted with its associated coefficient w k ( n ) as defined in (10). This polygon consists of n = 10 4 vertices. The fractal structure of this polygon is already visible for this comparably low value of n. However, due to its discrete nature, self similarity is not that obvious for some parts of the polygon. Therefore, an improved fractal is derived by using the continuous Fourier basis instead of the discrete Fourier basis. That is, the Fourier polygon f k is replaced by the Fourier basis function f k ( t ) : = exp ( i k t ) . This results in the prime fractal curve
F c ( n , t ) : = k N , p k n w k ( n ) exp i ( p k 1 ) t , with t ( π , π ] .
For n = 10 6 , the resulting prime fractal curve is depicted in Figure 5a. It has been obtained by evaluating F c ( 10 6 , t ) at 10 7 equidistant parameters t ( π , π ] . In this case, F c is the sum of π ( 10 6 ) = 78498 weighted Fourier basis functions. A zoom of the box marked red in Figure 5a is depicted in Figure 5b. The recurring structures show the fractal nature of the curve.
The fractal dimension of a curve, also known as Minkowski-Bouligand dimension, is given by
d : = lim ε log N ( ε ) log ( 1 / ε ) ,
where ε denotes the edge length of the square boxes covering the fractal curve and N ( ε ) the number of covering boxes [16]. For the curve depicted in Figure 5a, the fractal dimension is estimated by recursively subdividing a tight initial square bounding box of F c . For each subdivision level m { 0 , , 20 } , this results in a grid of 2 m × 2 m squares and the associated estimate d m : = log ( N m ) / log ( 2 m ) , where N m denotes the number of grid boxes with nonempty intersections with the fractal curve. The approximate fractal dimension for the finest subdivision grid results to d 20 1.3995 .
Figure 6 depicts the number of nonempty intersection boxes N m versus the grid width ε m for m { 0 , , 20 } using logarithmic scales for both axes. The fractal dimension estimate derived by the slope of the line of best fit of these 21 points amounts to d 1.4107 .

5. Conclusions

In this publication, prime number related fractal polygons and curves have been derived by combining two different results. One is the approximation of the prime counting function π ( x ) by the partial sum β α δ ( x ) based on an additive function as proposed in [1]. The other are prime indexed basis functions of the continuous Fourier transform. The motivation for this are the column vectors of the discrete Fourier matrix used for diagonalizing a circulant Hermitian matrix representing a regularizing transformation of polygons in the complex plane.
As has been shown in earlier publications [2,5], there is a relation between the shape of limit polygons of such iteratively applied polygon transformations and prime numbers. This is due to the cyclic group defined by the roots of unity and the exponential representation of the entries of the columns of the discrete Fourier matrix. The latter are called Fourier polygons. For prime number indices, these polygons are star shaped.
By replacing the prime numbers in a scaled representation of β α δ ( x ) for a given x N by the associated Fourier polygons, the polygonal prime fractal F p is derived. Its graphical features are increased, if x tends to infinity. Alternatively, by using the prime number related basis functions of the continuous Fourier transform, the prime fractal curve F c is derived which is approximated by F p . The prime fractal polygon as well as the prime fractal curve show similar patterns on different scales as has been demonstrated graphically. In addition, a numerical estimate for the fractal dimension based on the box counting method was derived for the case n = 10 6 . However, obtaining more detailed results for much larger n would be desirable.
The given result combines aspects from prime number theory, group theory, and circulant Hermitian matrices. It is based on Fourier transformation which also plays a role in dynamical systems associated to geometric element transformations [17]. The resulting prime fractals provide an alternative visual representation of an approximation of the prime counting function and with this of prime numbers and their structures itself. It is hoped that these alternative representations provide a basis for further insights into the structure of the distribution of prime numbers. Furthermore, applying similar visualization techniques to other number theory functions might reveal additional insights. This is also the subject of the subsequent publication [18] analyzing fractal curves from prime trigonometric series and the distribution of prime numbers.

Author Contributions

D. Vartziotis conceived the experiments; D. Vartziotis and J. Wipper designed the experiments; J. Wipper performed the experiments; D. Vartziotis and J. Wipper analyzed the data; J. Wipper wrote the paper.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Vartziotis, D.; Tzavellas, A. The β-Functions and Their Relation to the Prime Counting Function. arXiv, 2016; arXiv:1607.08521. [Google Scholar]
  2. Vartziotis, D.; Wipper, J. Classification of symmetry generating polygon-transformations and geometric prime algorithms. Math. Pannonica 2009, 20, 167–187. [Google Scholar]
  3. Ore, O. Number Theorey and Its History; Dover Publications Inc.: New York, NY, USA, 1988. [Google Scholar]
  4. Tao, T. Structure and Randomness in the Prime Numbers. 2007. Available online: http://www.math.ucla.edu/ (accessed on 30 October 2016).
  5. Vartziotis, D.; Wipper, J. Characteristic parameter sets and limits of circulant Hermitian polygon transformations. Linear Algebra Its Appl. 2010, 433, 945–955. [Google Scholar] [CrossRef]
  6. Batchko, R.G. A Prime Fractal and Global Quasi-Self-Similar Structure in The Distribution of Prime-Indexed Primes. arXiv, 2014; arXiv:1405.2900. [Google Scholar]
  7. Green, B.; Tao, T. The primes contain arbitrarily long arithmetic progressions. Ann. Math. 2008, 167, 481–547. [Google Scholar] [CrossRef]
  8. Cattani, C. Fractal Patterns in Prime Numbers Distribution. In Computational Science and Its Applications—ICCSA 2010: Proceedings of the International Conference, Fukuoka, Japan, 23–26 March 2010, Part II; Springer: Berlin/Heidelberg, Germany, 2010; pp. 164–176. [Google Scholar]
  9. Selvam, A. Universal characteristics of fractal fluctuations in prime number distribution. Int. J. Gen.Syst. 2014, 43, 828–863. [Google Scholar] [CrossRef]
  10. 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]
  11. Alladi, K.; Erdös, P. On an additive arithmetic function. Pac. J. Math. 1977, 71, 275–294. [Google Scholar] [CrossRef]
  12. Davis, P.J. Circulant Matrices, 2nd ed.; Chelsea Publishing: New York, NY, USA, 1994. [Google Scholar]
  13. Vartziotis, D.; Wipper, J. The geometric element transformation method for mixed mesh smoothing. Eng. Comput. 2009, 25, 287–301. [Google Scholar] [CrossRef]
  14. Vartziotis, D.; Wipper, J. Fast smoothing of mixed volume meshes based on the effective geometric element transformation method. Comput. Methods Appl. Mech. Eng. 2012, 201–204, 65–81. [Google Scholar] [CrossRef]
  15. Vartziotis, D.; Himpel, B. Efficient Mesh Optimization Using the Gradient Flow of the Mean Volume. SIAM J. Numer. Anal. 2014, 52, 1050–1075. [Google Scholar] [CrossRef]
  16. Falconer, K. Fractal Geometry. Mathematical Foundations and Applications, 3rd ed.; John Wiley & Sons: Hoboken, NJ, USA, 2014. [Google Scholar]
  17. Vartziotis, D.; Bohnet, D. Existence of an attractor for a geometric tetrahedron transformation. Differ. Geom. Its Appl. 2016, 49, 197–207. [Google Scholar] [CrossRef]
  18. Vartziotis, D.; Bohnet, D. Fractal Curves From Prime Trigonometric Series and the Distribution of Prime Numbers. arXiv, 2017; arXiv:1702.05426. [Google Scholar]
Figure 1. The prime counting function π ( x ) and its approximations.
Figure 1. The prime counting function π ( x ) and its approximations.
Fractalfract 01 00010 g001
Figure 2. Transformation of an initial polygon by two substeps based on similar triangles.
Figure 2. Transformation of an initial polygon by two substeps based on similar triangles.
Fractalfract 01 00010 g002
Figure 3. Fourier polygons f k (blue) for n = 4 and n = 5 with given vertex indices.
Figure 3. Fourier polygons f k (blue) for n = 4 and n = 5 with given vertex indices.
Fractalfract 01 00010 g003
Figure 4. Polygonal prime fractal F p ( 10 4 ) .
Figure 4. Polygonal prime fractal F p ( 10 4 ) .
Fractalfract 01 00010 g004
Figure 5. Prime fractal curve F c for n = 10 6 and 10 7 evaluation points t k ( π , π ] . Boxes of successive zooms are marked red. (a) Full fractal; (b) Zoom level 1; (c) Zoom level 2.
Figure 5. Prime fractal curve F c for n = 10 6 and 10 7 evaluation points t k ( π , π ] . Boxes of successive zooms are marked red. (a) Full fractal; (b) Zoom level 1; (c) Zoom level 2.
Fractalfract 01 00010 g005
Figure 6. Log-log plot of intersecting boxes number versus grid width.
Figure 6. Log-log plot of intersecting boxes number versus grid width.
Fractalfract 01 00010 g006

Share and Cite

MDPI and ACS Style

Vartziotis, D.; Wipper, J. The Fractal Nature of an Approximate Prime Counting Function. Fractal Fract. 2017, 1, 10. https://doi.org/10.3390/fractalfract1010010

AMA Style

Vartziotis D, Wipper J. The Fractal Nature of an Approximate Prime Counting Function. Fractal and Fractional. 2017; 1(1):10. https://doi.org/10.3390/fractalfract1010010

Chicago/Turabian Style

Vartziotis, Dimitris, and Joachim Wipper. 2017. "The Fractal Nature of an Approximate Prime Counting Function" Fractal and Fractional 1, no. 1: 10. https://doi.org/10.3390/fractalfract1010010

Article Metrics

Back to TopTop