
TL;DR
This paper introduces various methods for generating primes based on sums of primes, including a construction that yields six new primes for each starting prime, expanding the understanding of prime generation techniques.
Contribution
The paper presents novel prime-generating constructions based on sums of primes, notably achieving a method that produces six new primes per starting prime.
Findings
A construction producing 6 new primes per starting prime
Various prime-generating methods with different dimensions
Enhanced understanding of prime sums and generation
Abstract
We present a variety of prime-generating constructions that are based on sums of primes. The constructions come in all shapes and sizes, varying in the number of dimensions and number of generated primes. Our best result is a construction that produces 6 new primes for every starting prime.
| Prime Vector | Weight | Time | |
|---|---|---|---|
| 1 | 2 | ||
| 2 | 8 | ||
| 3 | 19 | ||
| 4 | 26 | ||
| 5 | 43 | ||
| 6 | 56 | ||
| 7 | 79 | ||
| 8 | 104 | ||
| 9 | 127 | ||
| 10 | 166 | ||
| 11 | 223 | 17s | |
| 12 | 258 | 8m | |
| 13 | 307 | 73m | |
| 14 | 348 | 14h |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | |
|---|---|---|---|---|---|---|---|---|---|
| lower bound | 379 | 438 | 499 | 566 | 643 | 710 | 809 | 872 | 983 |
| upper bound | 443 | 522 | 641 | 888 | 983 | 1430 | 1627 | 1824 | 3203 |
| Cyclic Prime Vector | Weight | Time | |
|---|---|---|---|
| 1 | 2 | ||
| 2 | 8 | ||
| 3 | 19 | ||
| 4 | 48 | ||
| 5 | 53 | ||
| 6 | 108 | ||
| 7 | 113 | ||
| 8 | 210 | ||
| 9 | 197 | 9s | |
| 10 | 510 | 2m |
| Cyclic Prime Vector | Weight | |
|---|---|---|
| 11 | 683 | |
| 12 | 1260 | |
| 13 | 1373 | |
| 14 | 2310 |
| Prime Tuple | Length | Weight | |
| 3 | 7 | 23 | |
| 5 | 11 | 59 | |
| 7 | 25 | 1423 | |
| 9 | 19 | 179 | |
| 11 | 23 | 211 | |
| 13 | 34 | 1163 | |
| 15 | 31 | 491 | |
| 17 | 35 | 647 | |
| 19 | 43 | 2081 | |
| Prime Stair | Weight | Time | |
|---|---|---|---|
| 3 | 19 | ||
| 4 | 26 | ||
| 5 | 39 | ||
| 6 | 56 | ||
| 7 | 79 | ||
| 8 | 106 | ||
| 9 | 161 | 8s | |
| 10 | 202 | 3m | |
| 11 | 269 | 2.5h |
| Prime Stair | Weight | |
|---|---|---|
| 12 | 348 | |
| 13 | 479 | |
| 14 | 624 | |
| 15 | 2497 |
| Level 0 | Level 1 | Level 2 | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
| n | Prime Pyramid | Weight | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 |
|
127 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 |
|
458 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 |
|
1159 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 |
|
2582 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 |
|
5115 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 |
|
9204 |
| 11 | 79 | 349 | 461 | 433 | 859 | 683 | 587 | 631 |
| 367 | 31 | 593 | 167 | 331 | 307 | 277 | 577 | 743 |
| 311 | 67 | 191 | 151 | 281 | 47 | 101 | 619 | 439 |
| 389 | 761 | 613 | 229 | 173 | 607 | 13 | 43 | 271 |
| 421 | 563 | 241 | 557 | 317 | 337 | 673 | 751 | 113 |
| 73 | 71 | 127 | 137 | 163 | 193 | 661 | 23 | 181 |
| 409 | 571 | 691 | 61 | 83 | 251 | 179 | 233 | 877 |
| 467 | 53 | 227 | 59 | 89 | 373 | 401 | 37 | 149 |
| 19 | 547 | 809 | 521 | 131 | 41 | 659 | 503 | 491 |
| Prime Cylinder | Layers | Weight | |
|---|---|---|---|
| 4 | 6 | 4620 | |
| 6 | 6 | 4158 | |
| 8 | 5 | 1890 | |
| 10 | 4 | 480 | |
| 12 | 4 | 648 |
| 7 | 5 | 3 |
|---|---|---|
| 17 | 11 | 3 |
| 3 | 7 | 19 |
| n | Goldbach Square | Weight | |||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 |
|
18 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 3 |
|
75 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 4 |
|
208 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 5 |
|
499 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 6 |
|
1078 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 7 |
|
2077 |
| n | Goldbach Square | Weight | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 8 |
|
3766 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 |
|
6187 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 |
|
9212 |
| n | Prime Matrix | Weight | Lower Bound | |||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3 |
|
127 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 |
|
438 | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 |
|
1403 | 1159 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 6 |
|
5796 | 2582 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 7 |
|
25891 | 5115 | |||||||||||||||||||||||||||||||||||||||||||||||||
| Construction | Order | Efficiency |
| Cyclic Prime Vector | 14 | 6 |
| Prime Vector | 23 | 5.26 |
| Prime Cylinder | 4 and 6 | 5 |
| Prime Matrix | 7 | 4 |
| Prime Stair | 15 | 3.27 |
| Prime Tuple | 7 | 2.57 |
| Prime Pyramid | 9 | 1.04 |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Combinatorial Mathematics · Advanced Mathematical Identities · Analytic Number Theory Research
Prime Sums of Primes
Dmitry Kamenetsky
Adelaide, Australia
Abstract
We present a variety of prime-generating constructions that are based on sums of primes. The constructions come in all shapes and sizes, varying in the number of dimensions and number of generated primes. Our best result is a construction that produces 6 new primes for every starting prime.
1 Introduction
Constructions made from primes have fascinated mathematicians for many decades due to the beauty of their design. A number of such constructions have been proposed, such as: prime magic squares [4, 9], prime arrays [8] and primes in arithmetic progressions [1, 2].
In this paper we investigate some new prime-generating constructions that are based on sums of primes. Our constructions come in two flavours: standard and recursive. In standard constructions new primes are generated as the sum of primes used in the construction. Recursive constructions generate new primes, which in turn generate further primes. The recursion terminates when no more primes can be generated. Typically we only use odd primes (ignore 2), forcing our sums to contain an odd number of elements. Our overall aim is to generate constructions of the largest size (order). If two constructions have the same order then we typically prefer the one with smallest sum of elements (weight). To find all the constructions we use a variant of the randomised hill-climbing algorithm. For small constructions we were able to find the optimal solutions (smallest weight) by using a brute force method.
We describe the following standard constructions: prime vectors (Section 2), cyclic prime vectors (Section 2.1), Goldbach squares (Section 6) and prime matrices (Section 7). We describe the following recursive constructions: prime tuples (Section 3), prime stairs (Section 4), prime pyramids (Section 4.1) and prime cylinders (Section 5).
2 Prime Vectors
Definition 2.1**.**
A prime vector of order is an array of distinct primes , such that every sum of an odd number of consecutive elements is also prime. In other words
[TABLE]
In the above definition, is the index of the first prime in each sum, while is the number of terms in each sum.111If then we have a singleton rather than a sum. For a given there are sums. Consider a prime vector of order 5: . Its every element is prime, as well as, every sum of an odd number of consecutive elements:
[TABLE]
We used a variant of hill-climbing to find prime vectors (see Algorithm 1). We start with a random array of distinct primes and then perform various mutations, such as swapping two primes or replacing one prime with a new one. If the mutation improves the score then we keep it, otherwise we revert it. The score measures the number of “incorrect” (composite) sums that the array generates. Hence we want to minimise this score. Using this algorithm we were able to obtain a prime vector of order 23 that generates 121 primes222Prime vectors of smaller orders are sub-arrays of this array.:
(239, 131, 109, 181, 83, 43, 41, 223, 53, 233, 271, 103, 269, 71, 19, 47, 241, 23, 277, 199, 281, 29, 37).
For small orders it is possible to obtain multiple solutions. In such cases we choose the solution with the smallest weight - sum of all elements. In fact, this allows us to define an optimal prime vector:
Definition 2.2**.**
A prime vector is optimal if its weight is the lowest possible.
For we were able to find the optimal prime vectors (see Table 1). To achieve this we used a brute force algorithm. This algorithm iterates through every permutation of distinct odd primes whose weight is below the best known weight. If a permutation forms a prime vector then the best known weight is updated and the array is printed out. The algorithm terminates when there are no more permutations whose weight is less than the best known weight. Table 1 also shows the running time of this algorithm.
For we used Algorithm 1 to find the upper bounds on the minimal weight (see Table 2). To obtain the lower bound we used sequences from the OEIS [7]. For odd the weight must be a prime, so we used sequence A068873 - smallest prime which is a sum of distinct primes. For even we used sequence A071148 - sum of the first odd primes.
2.1 Cyclic Prime Vectors
We can also introduce a cyclic prime vector and define its optimality in a similar fashion:
Definition 2.3**.**
A cyclic prime vector of order is a prime vector of order with the additional property that prime sums can span from the end to the start of the array. In other words
[TABLE]
For a given there are sums. For example the cyclic prime vector generates the following 6 sums:
[TABLE]
Cyclic prime vectors differ from normal prime vectors in a few key ways. Every cyclic prime vector is also a normal prime vector, but the opposite may not be the case. Unlike normal prime vectors, cyclic prime vectors can be permuted without affecting their prime sums. Also we cannot easily generate cyclic prime vectors as sub-arrays of larger cyclic prime vectors. Due to the cyclic requirement, cyclic prime vectors require more prime sums for the same order, making them significantly harder to find.
Using the brute force algorithm described above we were able to find the optimal cyclic prime vectors for (see Table 3). The computation for the optimal cyclic prime vector of order 11 was still running after 4 days, so it is not shown. It is interesting to note that the weight for is smaller than the weight for . Using an algorithm similar to Algorithm 1 we found cyclic prime vectors up to order 14 (see Table 4). The largest array generates 84 primes.
3 Prime Tuples
Definition 3.1**.**
A prime tuple of order (odd) with length is an array of distinct odd primes , such that every term after the -th term is the sum of the previous terms. In other words
[TABLE]
Note it is sufficient to use the first terms to represent a prime tuple, since the remaining terms can be generated via sums of previous terms. We seek to find prime tuples of order such that their length is greatest. For example, here is a prime tuple of order with length 25 - the longest we have found:
(157, 379, 487, 109, 13, 7, 271, 1423, 2689, 4999, 9511, 18913, 37813, 75619, 150967, 300511, 598333, 1191667, 2373823, 4728733, 9419653, 18763687, 37376407, 74452303, 148306273).
The first terms are shown in bold. The weight of a prime tuple of order is the sum of its first terms. When two tuples of the same order have the same length, then we prefer the one with the smaller weight.
Table 5 shows the best prime tuples that we found for . We have used a brute force approach to prove that the prime tuples for are optimal. We notice that for and the optimal prime tuples have length and must contain a 3.
4 Prime Stairs
Definition 4.1**.**
A prime stair of order is a matrix such that every element at row and column is a distinct prime and each new row is generated from the previous row as follows:
[TABLE]
For a given we must have . For a given there are sums. As a shorthand we can represent a prime stair of order via its first (top) row only, i.e., using an array of length . For example, the prime stair looks like this:
The weight of a prime stair is defined as the sum of all elements in the first row. We were able to find the optimal prime stairs for (see Table 6). The computation for the optimal prime stair of order 12 was still running after 4 days, so it is not shown. Using an algorithm similar to Algorithm 1 we found prime stairs up to order 15 (see Table 7). The largest stair generates 49 primes.
4.1 Prime Pyramids
Similarly we can define a 3D version of the prime stair that we will call a prime pyramid:
Definition 4.2**.**
*A prime pyramid of order is a matrix such that every element at level , row and column is a distinct prime and each new level is generated from the previous level as follows: *
[TABLE]
For a given we must have . For a given there are sums. As a shorthand we can represent a prime pyramid of order via its first (bottom) level only, i.e., using a array. For example, Table 8 shows a prime pyramid of order 5:
The weight of a prime pyramid is the sum of all elements in its first level. We were able to find all the optimal prime pyramids up to order 8 (see Table 9). We also found an order 9 prime pyramid with a weight of 27325, but its optimality is not confirmed (see Table 10).
5 Prime Cylinders
Definition 5.1**.**
A prime cylinder of order with layers is a matrix P of odd primes, such that for every and : .
Note that the columns wrap around and hence the term ‘cylinder’. For example here is a prime cylinder of order 4 and 6 layers - the best found so far:
Since all the values below the first layer can be generated from previous values, a prime cylinder can be described using its first layer only. So the above prime cylinder would be described as . The weight of a prime cylinder is the sum of values in its first layer. When multiple prime cylinders have the same order and number of layers, then we prefer the one with the smaller weight. Prime cylinders were originally introduced in [5], but were limited to . Here we investigate other values of . It turns out that prime cylinders of odd orders cannot have more than two layers, so we focus on prime cylinders of even orders. Table 11 shows the best prime cylinders found for .
6 Goldbach Squares
The famous Goldbach conjecture states that
Every even integer greater than 2 can be expressed as the sum of two primes.
Although the conjecture has been verified up to [3], a proof still remains elusive. Here we investigate a problem related to the Goldbach conjecture: can we place primes into a square such that every even number is generated as the sum of two adjacent cells? This puzzle has been explored in [6]. More formally we have:
Definition 6.1**.**
A Goldbach square of order is a matrix of odd primes (not necessarily unique) such that the sum of any two adjacent cells is one of the even numbers from to inclusive and every even number in this range appears exactly once.
For example, here is a Goldbach square of order 3:
The sums across rows are:
[TABLE]
The sums down columns are:
[TABLE]
Notice that every even number from 6 to 28 appears exactly once. If there are multiple Goldbach squares for a given then we prefer the one with the smallest sum of cells (weight). Tables 12 and 13 show the best Goldbach squares that we found for .
7 Prime Matrices
Definition 7.1**.**
A prime matrix of order is a matrix of odd primes, such that the sum of every odd number of elements in any straight line is prime. More formally, we have
[TABLE]
We were able to find prime matrices up to order 7. For we found optimal (smallest weight) prime matrices. The results can be seen in Table 14. The lower bound on the optimal weight is the sum of the first odd primes.
8 Conclusion and Future Work
We have investigated a number of constructions that generate primes via the sum of primes. Some constructions are more efficient than others at generating primes. We can define a construction’s efficiency as the number of primes it generates divided by the number of primes used to construct the construction. Table 8 shows the greatest efficiency achieved by each construction sorted from highest to lowest:
Many questions remain unresolved:
- •
What are the optimal prime vectors for ?
- •
Is there a prime vector of order 24 ?
- •
What are the optimal cyclic prime vectors for ?
- •
Is there a cyclic prime vector of order 15 ?
- •
What are the optimal prime tuples for ?
- •
What are the optimal prime stairs for ?
- •
Is there a prime stair of order 16 ?
- •
What is the optimal prime pyramid of order 9 ?
- •
Is there a prime pyramid of order 10 ?
- •
What are the optimal prime cylinders for ?
- •
Is there a Goldbach square of order 11 ?
- •
What are the optimal prime matrices for ?
- •
Is there a prime matrix of order 8 ?
9 Acknowledgements
We are very grateful to Trevor Tao for reviewing the paper and providing great suggestions. We also want to thank Carlos Rivera for running primepuzzles.net that inspired many of the constructions in this paper.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Primes in arithmetic progression. https://en.wikipedia.org/wiki/Primes_in_arithmetic_progression .
- 2[2] Jens Kruse Andersen. Primes in arithmetic progression records. http://primerecords.dk/aprecords.htm .
- 3[3] Tomás Oliveira e Silva. Goldbach conjecture verification. http://www.ieeta.pt/~tos/goldbach.html .
- 4[4] Harvey Heinz. Prime Magic Squares. http://recmath.org/Magic%20Squares/primesqr.htm .
- 5[5] Carlos Rivera. Puzzle 831. Rings of primes. http://primepuzzles.net/puzzles/puzz_831.htm .
- 6[6] Carlos Rivera. Puzzle 835. Goldbach squares. http://primepuzzles.net/puzzles/puzz_835.htm .
- 7[7] Neil Sloane. The On-Line Encyclopedia of Integer Sequences. http://oeis.org .
- 8[8] Eric W. Weisstein. Prime Array. http://mathworld.wolfram.com/Prime Array.html .
