Preprint
Article

This version is not peer-reviewed.

Development of a Simple Prime Number Determination Method by excluding Composite Numbers on 6n±1

Submitted:

28 July 2024

Posted:

30 July 2024

You are already at the latest version

Abstract
A prime number is a natural number with no divisors other than itself and the number 1. There are many unsolved problems related to prime numbers. One such problem is finding a general method for identifying prime numbers. Although it is known that all prime numbers fall under the categories of 2, 3, or 6n±1 (where n≥1), a formalized method for eliminating composite numbers (non-prime numbers) from these categories has yet to be developed. This paper aims to explore a possible method for such elimination, which involves checking whether there exists an n that satisfies n = 6km+k+m or n = 6km+k-m (where k and m are non-zero integers). This method is expected to be a major step forward in the derivation of prime numbers.
Keywords: 
;  ;  

1. Introduction

Prime numbers have been of interest to scientists since Euclid's theorem was first formulated in 300 BC. Until now, prime numbers have been considered difficult to find regularity in. On the other hand, they can be found in natural phenomena even before the birth of mankind. For example, periodic cicadas are buried in the ground during their larval stage, emerging and changing into adults every 13 or 17 years [1,2]. For example, the ancient Eratosthenes devised a method of eliminating only multiples of prime numbers based on the definition of prime numbers. Also, the first mention of computer algorithms being used to generate prime numbers dates back more than 60 years [3]. Linear algorithms appeared in the late 1970s and were published by Mairson [4], Pratt [5], and Gries/Misra [6]. Later, C. Bays/R. Hudson introduced the SoE segmentation technique [7]. Paul Pritchard created sublinear sieves in the 1980s, and Jonathan Sorenson published several significant articles in the 1990s. [8,9,10] The last major contribution was made by Atkin/Bernstein in 2003, and Atkin's sieve remains the most practical sieve with the least theoretical complexity [11]. However, these prime number estimation methods consist mainly of estimation methods in computers, and although several less computationally intensive methods have been considered, their simplified prime number determination methods have not been established. Therefore, in this paper, we focus on the 6n±1 part of the nth prime number, which has been used in the basic prime number sieving method and simplify the method of arbitrarily sieving composite numbers and prime numbers from among the nth number 6n+1 and mth number 6m+1, so that the concept of prime numbers that have required sieving can be easily calculated. We speculated that by simplifying the method of arbitrarily sifting composite numbers and primes out of the nth number 6n+1 and mth number 6m+1, it might be possible to easily calculate the concept of prime numbers, which previously required sifting.

2. Methods

(1) Classification of prime numbers
First, prime numbers are classified into three categories as shown in Table In this study, we focus on primes represented by 6n±1, i.e., all primes other than 2 and We discuss in this paper general solutions for deriving composite numbers among the numbers satisfying 6n±1.
(2) Number of composites
As shown in Table 1, all prime numbers can be expressed as 2, 3, or 6n±However, while this satisfies the sufficient condition, it does not satisfy the necessary condition. In other words, 2, 3, and 6n±1 do not necessarily make a number prime. For example, 25 and 35 satisfy 6n+1 (n = 4) and 6n-1 (n = 6), respectively, but are not prime numbers. Such a number represented by the product of two or more prime numbers is known as a composite number. In this paper, we focus on composite numbers on 6n±1 and construct a simple method to find all composite numbers including multiples of 2 and By applying the classification of prime numbers, we derive a general solution that represents all composite numbers.
(A) When the composite number is 6n+1
First, consider the regularity of composite numbers on 6n+1.
There exist composite numbers that satisfy 6n+1, such as 25, 49, and 91, but these numbers are those that have more than one factor of (6n+1), since they cannot be expressed as a multiple of 2 or 3.
For example, the natural numbers satisfying 6n+1 are written as in equation (1)-(3).
(6·(-1)+1)·(6·(-1)+1) = 25
(6·1+1)·(6·1+1) = 49
(6·2+1)·(6·1+1) = 91
The general solution of the composite number K is expressed as a product of primes: the product of primes or composite numbers K between 6k+1 satisfies 6k+1 (for example, (6.1+1)·(6.4+1) = 7·25 = 175 = 6·29+1). Thus, the general solution is equations (4) and (5).
(6k+1)·(6m+1) (where n and m are integers, n≠0 and m≠0).
K = (6k+1)·(6m+1) = 36km + 6m + 6k + 1
Here, let K be the number that appears in the x-item on y = 6x+1,
Solving this yields, equation (6).
x = 6km+k+m
Thus, the composite number 36km+6m+6k+1 appears in the 6km+k+m entries on y = 6n+Note that prime numbers appear in terms that do not satisfy this equation.
In 6km+k+m, for example, if we substitute n= -1 m= -1, the four items are,
The composite number 25 is shown in equation (7).
36km+km+6k+1 = 25 (k = -1, m = -1)
Also, if we substitute k=1, m=1, the eight items are
We see that the composite number is 49 shown in equation (8).
36km+km+6k+1 = 36·1· 1 + 6· 1 + 6· 1 + 1 = 25 (k = -1, m = -1 )
Any number that does not satisfy this equation is prime on 6n+1.
Therefore, it can be explicitly shown that composite and prime numbers are distributed as shown in Table 2. Since this is a very simple formula, it can be applied to a new prime number determination method.
(B) When the composite number is 6n-1
Let us consider again the definition of a prime number. A prime number is a natural number that has neither 1 nor any other divisor. Therefore, they cannot be written in the form (a+b)·(a-b). On the other hand, composite numbers can be written in the form (a+b)·(a-b). Now, substituting equation (9).
a = 6k, b = 1, from (6k+1)·(6k-1) = 36k2 -1
We can replace 6·(6k2 )-1 = 6n-Taking the product of 6k+1 primes and 6m-1, which makes this a general 6n-1 equation, we can express the equation as (6k+1)·(6m-1)= 6(6km+m-k)-Thus, the composite number 6(6km+m-k)-1 appears in the 6km+m-k entry. For example, substituting k=1, m=1 for 6.1+1-1=6 items, the composite number K=6.6-1=35, substituting k=-1, m=-2, the composite number 6.11-1=65 appears in the 11th item. This can be summarized in a table and described as shown in Table 3.
(C) Other composite numbers
The composite numbers that apply to multiples of 2 are synonymous with 6k, 6k-2, and 6k-Therefore, they can be represented by these three types of expressions. The only prime number that fits 2n is 2(k=1). The composite numbers that apply to multiples of 3 are 6n, 6k+Therefore, it can be expressed by these two equations. Note that the only prime number that fits 3n is 3 (n=1).

3. Results

The regularities determined by methods (1)-(3) can be summarized and described as shown in Table 4.
From Table 4, a simple way to determine if an integer N other than 2 or 3 is prime is,
(A) when the remainder is 1
(a) Calculate n by n=(N-1)/6
(b) Find a solution to 6km+k+m=n and determine if it is prime. If this solution k,m is an integer, then n is a composite number. If there is no integer satisfying k,m, then n is a prime number.
(B) when the remainder is 5
(a) Calculate n by n=(N+1)/6
(b) Find a solution to 6km+k-m=n and determine if it is prime. If this solution k,m is an integer, then n is a composite number. If there is no integer satisfying k,m, then n is a prime number.
For example, when N=91
(1) n = 15 shown in equation (10).
n = (91-1)/6 = 15
(2) Since there exist integer solutions k,m satisfying n=15, 6km+k+m=n, 91 is a composite number by equation (11).
k = 1, m = 2 or k = 2, m = 1
(3) when N = 47 shown in equation (12).
n = (47+1)/6=8
(4) There is no integer solution k,m satisfying n=8, 6km+k-m=n.
Thus, 47 is a prime number.

4. Discussion

(1) Method for determining k,m for n=6km+k+m and 6km+k-m
The combination of k and m is essential in determining whether k and m have integer solutions other than Since two variables are involved, it is far from easy to determine. At the present stage, it is possible to generate an infinite number of composite numbers contained in 6n±1 by combining k and m. In the future, we are considering determining k and m and determining whether the integers before and after the number are prime numbers.
(2) Difference from existing determination method k·m (n≠1) = 6n±1
Based on the definition of prime numbers in the first place, if the divisors are k and m, and k and m are other than 1, then they are composite numbers. However, since it requires the same amount of computation as the sieve of Eratosthenes, the formula may seem simple at first glance, but even if n·m satisfies the condition, it will be necessary to re-examine the divisor to determine whether n·m is a composite number or a prime number, and the amount of computation will be enormous. Therefore, we can conclude that the method of determining whether 6km+k+m or 6km+k-m has an integer solution is a method to reduce the amount of computation.

5. Conclusions

Although it has been clear that prime numbers are either 6n+1 or 6n-1, it has not been easy to sift out composite numbers from prime numbers among them. In this paper, we explicitly stated that the n-item 6n+1 is a composite number if it satisfies n = 6km+k+m (k·m are non-zero integers), and is a prime number otherwise. We also proved similarly that the n-item 6n-1 is a composite number if it satisfies n = 6km+k-m (k·m are non-zero integers) and is prime otherwise. With the clarification of these theories, it is taken into consideration that it is relatively easy to estimate prime numbers. As one of the various methods of prime number determination that have been devised since the ancient Eratosthenes, the authors hope that this method will contribute to mathematicians around the world and to applied research in engineering, physics, biology, and other fields that utilize prime numbers.

Author Contributions

Conceptualization, H. S.; methodology, H. S.; software, H. S.; validation, Y.T., H.S.; project administration, H.S.; All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

No ethical approval is required.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets generated analyzed during the current study are available from the corresponding author on reasonable request.

Acknowledgments

We received a mathematical perspective from Ms. Saki Kikuchi of Ochanomizu University. The paper was also proofread for grammatical error by Mr. Haruki Noah Takeda. Their contribution to the publication of this paper is immeasurable. We thank them for their hard work.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Lehmann-Ziebarth, N.; Heideman, P.P.; Shapiro, R.A.; Stoddart, S.L.; Hsiao, C.C.L.; Stephenson, G.R.; Milewski, P.A.; Ives, A.R. Evolution of Periodicity in Periodical Cicadas. Ecology 2005, 86, 3200–3211. [Google Scholar] [CrossRef]
  2. Williams, K.S.; Simon, C. The Ecology, Behavior, and Evolution of Periodical Cicadas. Annu. Rev. Èntomol. 1995, 40, 269–295. [Google Scholar] [CrossRef]
  3. Mairson, H.G. Some new upper bounds on the generation of prime numbers. Commun. ACM 1977, 20, 664–669. [Google Scholar] [CrossRef]
  4. Pratt, V.R. CGOL-An Algebraic Notation for MACLISP Users; Working Paper; MIT AI Lab: Cambridge, MA, USA, 1977. [Google Scholar]
  5. Gries, D.; Misra, J. A linear sieve algorithm for finding prime numbers. Commun. ACM 1978, 21, 999–1003. [Google Scholar] [CrossRef]
  6. Wood, T.C. Algorithm 35: Sieve. Commun. ACM 1961, 4, 151. [Google Scholar] [CrossRef]
  7. Bays, C.; Hudson, R.H. The segmented sieve of Eratosthenes and primes in arithmetic progressions to 1012. BIT Numerical Mathematics 1977, 17, 121–127. [Google Scholar] [CrossRef]
  8. Pritchard, P. A sublinear additive sieve for finding prime number. Commun. ACM 1981, 24, 18–23. [Google Scholar] [CrossRef]
  9. Pritchard, P. Explaining the wheel sieve. Acta Inform. 1982, 17. [Google Scholar] [CrossRef]
  10. Pritchard, P. Fast compact prime number sieves (among others). J. Algorithms 1983, 4, 332–344. [Google Scholar] [CrossRef]
  11. Atkin, A.O.L.; Bernstein, D.J. Prime sieves using binary quadratic forms. Math. Comput. 2003, 73, 1023–1030. [Google Scholar] [CrossRef]
Table 1. Classification of prime numbers.
Table 1. Classification of prime numbers.
general expression (Example.)
2, 3 2 3 - - -
6n+1 7 13 19 31 37
6n-1 5 11 17 23 29
Table 2. Prime Number Determination (6n+1).
Table 2. Prime Number Determination (6n+1).
n 1 2 3 4 5 6 7 8 9
6n+1 7 13 19 25 31 37 43 49 55
n=6km+k+m
(k,m are integers)
NO NO NO YES NO NO NO YES YES
Prime or composite number prime number prime number prime number composite number prime number prime number prime number composite number composite number
Table 3. Prime Number Determination (6n-1).
Table 3. Prime Number Determination (6n-1).
n 1 2 3 4 5 6 7 8 9
6n-1 5 11 17 23 29 35 41 47 53
n=6km+k-m
(k,m are integers)
NO NO NO NO NO YES NO NO NO
Prime or composite number prime number prime number prime number prime number prime number composite quantity prime number prime number prime number
Table 4. General formulas for prime and composite numbers.
Table 4. General formulas for prime and composite numbers.
N General formula for composite numbers (n≥1) General formula for prime numbers (n≥1)
6n 6n
(Ex. 6,12,18,24,30)
-
6n+1 6n+1
(n=6km+k+m (k,m are integers))
(Ex. 25,49,91)
6n+1
(n≠6km+k+m (k,m are integers))
(Ex. 7,13,19,31)
6n+2 (or 6n-4) 6n+2
(Ex. 8,14,20,26,32)
2
6n+3(or 6n-3) 6n+3
(Ex. 9,12,15,18)
3
6n+4 4, 6n+4
(Ex. 4,10,16,22)
-
6n+5 6n+5
(n = 6km+k-m (k,m are non-zero integers))
(Ex. 35,77,105)
5, 6n+5
(n≠6km+k-m (k,m are non-zero integers))
(Ex. 11,17.23.29,41)
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated