© Jean Pierre Délèze, ing. EPFL, 2018

Stratification of Prime numbers, Remarkable columns Distribution This document can be freely copied and distributed provided that it is in full and without any change. Extracts can be copied and distributed on the condition that the author is clearly mentioned as in the above copyright.

Thanks For lack of mentioning all persons to whom I am indebted for this project, here are two eminent: Ératosthène, for his genius Oliva, my wife, for her patience.

Table of Contents Summary..............................................................................................................................................2 Grid widths..........................................................................................................................................2 Examples of grids................................................................................................................................2 Calculation of remarkable columns.....................................................................................................4 Basic definitions..............................................................................................................................4 Logic of "formations" (solos, duets, trios etc).................................................................................5 Combinatorics for remarkable columns...........................................................................................6 Grids refining.......................................................................................................................................7 Conclusion...........................................................................................................................................7

Summary Prime numbers, when presented in grids of specific width, show a stratification in columns. The list of these columns follows a rather complex but precise calculation rule. These columns can be used to guide the search for prime numbers, avoiding a large proportion of areas that are known to be devoid of prime numbers.

Grid widths The widths for which the grids show stratification are products of a sequence of prime numbers, as in the table below. PN

Product

2

2

=2

3

2*3*

=6

5

2*3*5

= 30

7

2*3*5*7

= 210

11

2*3*5*7*11 = 2310

Examples of grids Grid of width 2

Grid of width 30

Grid of width 6

Graphic representations, columns in red, prime numbers in black, symmetry in blue. Grid of width 30

Grid of width 210

Grid of width 2310

Calculation of remarkable columns Basic definitions For the remaining of this presentation, the following symbols are used: PN PP (PN)

abbreviation for Prime Number Product of Prime Numbers up to PN.

PN

PP(PN)

2

2

=2

3

2*3*

=6

5

2*3*5

= 30

7

2*3*5*7

= 210

11

2*3*5*7*11 = 2310

Letâ€™s consider a grid whose height is PNi, and the width PP (PNi-1), for example: height width size

7 30 = 2 * 3 * 5 210 = 30 * 7

Its first line content is actually the previous grid content. In the example of the size grid 210, the previous grid would be the size grid having a size of 30.

Let PNL be the list of prime numbers in the first line, starting from PNi. In the example chosen, we would have: PNL = 7, 11, 13, 17, 23, 29. These are the remarkable columns for this grid. Let CRL be the list of remarkable columns. For grid size 210, CRL = PNL. For the next grid, we must also use the squares of the PNs in the list, as well as the products of the PN pairs in the list, taking care not to put in CRL a number that exceeds the width of the grid. The formula is generalized as follows. The CRL includes: 1) the PNs of PNL, then 2) The products of couples of these PNs, including squares 3) products of all trios, obtained by taking each PN of PNL combined with each couple produced in step 2) 4) the products of all quartets, obtained in the same way 5) then the products of the quintets, sextets etc. Let's call solos formation 1, duest formation 2, trios formation 3 etc. To sum up: the CRL contains the solos (the PNL list itself), then the products of duets, trios, quartets etc. However we must approach a formation n only if PN1n is less than the width of the grid. For example one stops before the quartets if PN14> L (width of the grid), PN1 being the first

PN of PNL. In this form, it would still generate far too many elements, for example we could take three times the value of 13 * 11 * 11, in the forms 11 * 13 * 11 and 11 * 11 * 13. In addition, the limit of the width of the grid must be respected. It was therefore necessary to develop a systematics to obtain a non-redundant CRL.

Logic of "formations" (solos, duets, trios etc) Consider the numbers a, b, c, d, of increasing values. (a <b <c <d), of which we will list the solos, duets, and trios. Solos are just our 4 numbers: a, b, c, d. Duos is a matrix: a b c d

a aa ab ac ad

b ab bb bc bd

c ac bc cc cd

c ad bd cd dd

But in fact we drop the terms below the diagonal, which already appear above the diagonal. 10 terms remain out of 16. \ a b c d

a aa

b ab bb

c ac bc cc

d ad bd cd dd

Trios: matrix with, in column headers, the 10 trios of the previous step and on line headers the 4 numbers: \ aa ab ac ad bb bc bd cc a aaa aab aac aad abb abc abd acc b baa bab bac bad bbb bbc bbd bcc c caa cab cac cad cbb cbc cbd ccc d daa dab dac dad dbb dbc dbd dcc But here too we have to drop numbers. For example, on line b: ba = aab, bab = abb, bac = abc etc. We get:

cd acd bcd ccd dcd

dd add bdd cdd ddd

\ a b c d

cd acd bcd ccd

dd add bdd cdd ddd

aa aaa

ab aab

ac aac

ad aad

bb abb bbb

bc abc bbc

bd abd bbd

cc acc bcc ccc

As we see, we drop in line x the products located before the cube xxx. So for each line L of a formation n (trio: n=3, quartet: n=4 etc.), we only consider, on the line, the products from Ln.

With example a, b, c, d, if we take complete matrices we would collect many terms: solos 4 duos 16 trios 64. Total 84 Taking into account the condition on squares and cubes, we get: solos 4 duos 10 trios 20 Total 34 We save 84-34 = 50, more than half of the elements. This saving is essential for large grids in order to limit calculation time as much as possible.

Combinatorics for remarkable columns Consider a grid whose height H is PNi, and the width L is PP (PNi-1). Its first line contains the previous grid, and contains prime numbers. Let PNL be the list of the prime numbers of the first grid from PNi. For example, for grid 3, of width 30 (2 * 3 * 5) and height 7: PNL = 7, 11, 13, 17, 23, 29 Let CRL be the list of remarkable columns. Let PN1 be the first number of PNLs (which happens to be the height of grid H). The CRL contains the products of solo formations, duets, trios, quartets etc. Call CRLi the products of the training i, that is: CRL1 the solos, the PNL list itself CRL2 duets, the products of PN couples taken in PNL, but for each PNL line of the matrix, only from PNL2 CRL3 the trios, where for each PN, we take the duets only since PN2 CRL4 the quartets, but for each PN, we only take the trios since PN3 We only take a CRLn formation if PN1N <L (grid width). The products of the CRLn formation are the products of each PNL PN with each product obtained from the previous formation; however, for each PN, the products of the previous formation are only taken from PNN, and if this number is missing in the previous formation, then there are no more elements to add, because they would all be beyond L (width of the grid).

Grids refining Once we have the list of remarkable columns, we can sketch the grid, but there is still a lot of work to finalize the grid. Indeed, the remarkable columns say where are the prime numbers, but in these columns there are also non prime numbers, which must be crossed out. Here is the algorithm in pseudo-code Let RCL be the sorted list of remarkable columns. For all N in RCL For all M dand RCL Prod = N * M If Prod < GridWidth cross out this this number because it is a multiple: sieve [Prod] = False Otherwise, end the loop on M indeed the following products would exceed the grid width This algorithm is simple, but it requires the list of columns to be sorted. In this case, there is a simple way to sort the columns. When the list of columns is made up, it is then used to fill the grid from the second line. This second line is part of the sieve, and consists of a Boolean sequence. We can therefore retrieve the list of columns simply by browsing this second line and listing the elements marked - the resulting list is sorted and without duplicates. It is an efficient sorting but it is a special case: we sort integers (cardinals) by "projecting" them into an array of Boolean having a size equal to the largest of these integers, the information being all contained in the Booleanâ€™s indexes.

Conclusion Using the logic of grids and remarkable columns, we have been able to list the prime numbers without visiting the large areas devoid of prime numbers (the "white" columns: the non-remarkable columns). Concordance with Eratosthenes could be established for a screen up to about 9 millions, maximum achievable with the available means. Programs have been developped in python and delphi (lazarus).

Pndoc 17 en c

Prime numbers, when presented in grids of specific width, show a stratification in columns. The list of these columns follows a rather compl...

Pndoc 17 en c

Published on Jun 14, 2018

Prime numbers, when presented in grids of specific width, show a stratification in columns. The list of these columns follows a rather compl...

Advertisement