Let a -prime be a positive integer number with divisors. From this definition, the usual prime numbers correspond to the particular case . Here, the seemingly random sequence of gaps between consecutive -primes is numerically investigated. First, the variability of the gap sequences for is evaluated by calculating the informational entropy. Then, these sequences are mapped into graphs by employing two visibility algorithms. Computer simulations reveal that the degree distribution of most of these graphs follows a power law. Conjectures on how some topological features of these graphs depend on are proposed.

1. Introduction

Prime numbers, the building blocks of any positive integer, fascinate math lovers [1, 2]. From a purely theoretical perspective, primes are crucial for understanding the properties of numbers [1, 2]. From an applied science perspective, primes have been used in cryptographic keys [3], can be found in the life cycles of cicadas [4], and characterize the energy spectrum of chaotic quantum systems [5].

Since 300 BC, the irregular distribution of primes throughout the sequence of natural numbers has been extensively investigated. Giants as Chebyshev, Dirichlet, Eratosthenes, Erdös, Euclid, Euler, Fermat, Gauss, Legendre, and Riemann analyzed this matter [1, 2]. To get some insight on this distribution, the statistical properties of the gaps between consecutive primes [6, 7], second-order gaps (the gaps between these gaps), and higher-order gaps [8, 9] have been examined. The distribution of primes has also been studied by using graphs. For instance, consider that primes are the nodes of a graph. Since any even number can be written as the sum of two primes, a pair of nodes is linked in this graph if it represents the sum of a given even number [10]. In another graph-based approach, the natural numbers are the nodes, and there is a connection between two nodes if they share a common prime divisor [11]. Graphs are also used in this work.

Assume that a -prime is a positive integer with divisors. Therefore, the usual prime numbers correspond to the case . In this work, the frequency of the gaps between -primes is computationally analyzed. First, the difference of successive -primes is calculated for , and the gap sequences thereby obtained are considered as discrete time series. To evaluate their variability, the informational entropy [12] of these series is computed. In addition, these series are transformed into undirected graphs by applying two visibility algorithms [13, 14]. The degree distribution and the average degree of these graphs are determined and compared. These are the main contributions of this work, which are described in the next section.

The aim of this study based on -primes is to understand how the gap sequences depend on . The proposed approach can be used to analyze other sequences of numbers found in nature [15], such as the energy levels of atomic nuclei and the quantum space-time structure [16].

2. Methodology and Numerical Results

Let a -prime be defined as a positive integer greater than 1 that is divisible by 1, the number itself, and (smaller) positive integers. Thus, a -prime has exactly distinct divisors. For instance, number 12 is a 6-prime because its (six) divisors are 1, 2, 3, 4, 6, and 12. A -prime with is usually called a composite number [1, 2]. Note that the 2-primes are just the usual primes. Thus, -prime is a naive generalization of the concept of prime number.

Let be the th-prime, with . For instance, is the fourth 3-prime, which is equal to 49. Table 1 presents a list of the first -primes for . Let be the gap between consecutive -primes. For instance, because and . Note that the sequence can be taken as a time series, in which corresponds to the time variable. Table 2 shows the first numbers of the series for .

In order to evaluate the variability of the series for , the informational entropy [12] was computed. This entropy has been calculated, for instance, in investigations on the dynamics of biological [17] and social systems [18]. Its normalized value, denoted by , is given by

The entropy and its maximum value (obtained in the case of for [12]) are calculated by taking as the relative frequency of occurrence of distinct . In these expressions, is the number of distinct values of .

As the next step, the time series were converted into undirected graphs by using two visibility algorithms [13, 14]. These algorithms have been employed, for instance, in the analysis of stock indices [19] and electroencephalography recordings [20]. Here, in the visibility graphs, each node represents a distinct value of .

Consider that . In the natural visibility (NV) graph [13], the nodes corresponding to and are connected if any intermediate point in the time series satisfies the inequality

Thus, these nodes are connected if there is a straight line joining and in the plot , provided that any intermediate point is below such a line. For instance, the four first points of the sequence shown in Table 2 are , , , and . There is a connection between the nodes corresponding to and because the intermediate datum is below the straight line linking these points in the plot , that is, because . Also, note that there is not a connection between the nodes and because . In this case, the datum (2, 16) is high enough to prevent the data (1, 5) and (3, 24) from seeing each other.

In the horizontal visibility (HV) graph [14], the nodes associated with and are connected ifwith . Thus, these nodes are connected if any intermediate point in the plot is below the horizontal line joining and . In the HV graph built from the beginning of the sequence , the nodes corresponding to and are not connected because ; that is, and cannot see each other because is high enough to block their horizontal visibility. Thus, and are connected in the NV graph, but they are not connected in the HV graph.

Numerical experiments were performed by taking , that is, the first 10,000 -primes for each value of . From these 10,000 -primes, 9999 values of were computed. The values corresponding to were discarded in order to neglect the initial transient and the effects of truncation .

The normalized entropy was computed by using equation (1). As shown in Table 3, for , and 11 because there is no repeated value of in the corresponding sequences. For and , ; for even, . Hence, for , odd favors equiprobable values of more than even.

From the gap sequences for , undirected visibility graphs were built by using equations (2) and (3). Then, the corresponding degree distributions and the average degree were determined. Recall that the degree of a node is the number of edges connected to this node [21]. Recall also that the degree distribution expresses how the percentage of nodes with degree varies with [21]. Usually, is interpreted as the probability of randomly picking a node with degree .

Figures 1 and 2 exhibit the log-log plot of for NV and HV graphs, respectively, for . Observe that most decay as a power law in these plots. Power laws have been found in the distribution of prime gaps [22] and in a myriad of contexts, such as a psychiatric ward [23] and financial crashes [24]. Here, is proportional to taken to the power , that is, , in which is the proportionality constant. In a log-log plot, ; thus, the power-law dependence is transformed into a linear relation between and . At least as a first approximation, this relation can be taken as linear in most plots shown in both figures; that is, a power-law form for can be considered a plausible model for these plots. Possible exceptions are the NV plots for .

Tables 4 and 5 present , , and for the 20 graphs. The average degree for the HV graphs is smaller than that for the NV graphs because HV graphs are subgraphs of the corresponding NV graphs. For the NV graphs, , with the exception of , which present higher values. For the HV graphs, for odd and for even. Note also that the values of and , determined from least square fitting [25], present smaller variability for the HV graphs than for the NV graphs. In addition, for the NV graphs, ; for the HV graphs, .

By reducing the quantity of -primes used in this computational study from to , the values of , , , and vary about 1% on average as compared to the numbers presented in Tables 3 and 5. For the results shown in Table 4, larger variations are found for and , the parameters of the fitted straight lines; the variations related to are also about 1% on average, with the exception of .

From the numerical experiments reported in this work, the following relations were found: , , , and ; thus, 3-primes, 5-primes, 7-primes, and 11-primes are just powers of prime numbers with powers 2, 4, 6, and 10, respectively. However, no relation between and with was found; that is, no relation was found between prime numbers and -primes when is not prime.

3. Discussion and Conclusion

The absence of a discernible pattern in the sequence of prime numbers has historically hampered the derivation of a formula for correctly generating such a sequence [1, 2]. The analytical generation of -primes, with , can be an even more challenging task mainly if is not prime. Here, the distribution of the gaps between -primes was examined by using a variability measure and two visibility graphs, which were deterministically built.

As shown in Table 3, for because repetitions in the sequences of are absent or rare; that is, these sequences are aperiodic. In addition, for ; thus, the variability of the gap lengths for even is lower than for odd. Therefore, a possible conjecture is: the normalized entropy distinguishes even from odd . In other words, the parity of determines the value of .

As shown in Figures 1 and 2 and Tables 4 and 5, most degree distributions of the visibility graphs built from the differences between successive -primes for approximately follow a power law written as . Fluctuations observed around the fitted straight lines shown in both figures can be effects of the finite size of the gap sequences used in the numerical experiments [26]. Recall that power-law distributions in the connectivity are associated with complex networks known as scale-free [2628]. Scale invariance in the degree distribution implies self-similarity; that is, of renormalized networks, obtained by a coarse-graining procedure [29], also follows a power law. Note that the value of in the NV and HV plots is not a good parameter to show the influence of the value of on the networks derived from the gap sequences; however, can highlight this influence: in NV plots, for that is prime, increases with ; for that is not prime, ; in HV plots, for odd and for even. Therefore, another possible conjecture is: in NV plots distinguishes that is prime from that is not prime; in HV plots distinguishes odd from even.

It is well known that, for HV graphs obtained for periodic sequences of period (without repeated number within a period), the average degree is given by [30]. As a consequence, for aperiodic series, (because ). According to Table 5, this is the approximate value of found for -primes with odd, which is in agreement with the value of presented in Table 3. It is also well known that, for an uncorrelated random sequence, the HV graph has [30]. Therefore, deviations from this degree distribution reveal that the studied sequence was not generated by an uncorrelated random process. The straight line corresponding to is shown as a dotted line in Figure 2. Note that for -primes has a smaller slope than the slope of . This smaller slope and can be features of chaotic sequences [30].

A final comment about the generation of -primes by deterministic equations: when is prime, then ; however, the way of obtaining when is not prime is not yet evident. Also, a formula to generate (the exact sequence of primes) remains to be found.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.


BLM thanks to Instituto Presbiteriano Mackenzie for the scholarship. LHAM is partially supported by Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq) under grant #304081/2018-3. This study was financed in part by Coordenação de Aperfeiçoamento de Pessoal de Nível Superior (CAPES)—finance code 001.