You are on page 1of 74

THERE IS NO SECURE TEST FOR PRIMALITY

Ing. Pier Francesco Roggero, Dott. Michele Nardelli, Francesco Di Noto

Abstract
In this paper we examine in detail a completely new test for the primality of
prime number and how all these tests behave in the mystery of prime
numbers.

Versione 1.0
2/10/2013
Pagina 2 di 74

Index:
1. PRIMALITY TEST ............................................................................................................................. 3
1.1 SUM OF THE DIGITS OF NUMBER N .............................................................................. 4
1.2 PRODUCT OF THE DIGITS OF THE NUMBER N ........................................................... 5
1.3 ANALYSIS OF PAIRS S e P ................................................................................................ 7
1.4 FURTHER INVESTIGATIONS ........................................................................................... 9
1.5 CONNECTION WITH PERFECT NUMBERS.................................................................. 14
2. CONCLUSIONS................................................................................................................................ 16
3. ANALYSIS OF 1229 PRIMES LESS THAN 10000........................................................................ 18
4. REFERENCES .................................................................................................................................. 67

Versione 1.0
2/10/2013
Pagina 3 di 74

1. PRIMALITY TEST
A primality test is an algorithm that allows to decide whether a given number is prime
or not.
We try to build one.
Given a number N with the last digit ends in 1, 3, 7 or 9 we add up its digits in modulo
9 (as is done with the proof of 9) and then multiply each digits in modulo 9.

Versione 1.0
2/10/2013
Pagina 4 di 74

1.1 SUM OF THE DIGITS OF NUMBER N

As the number N can also be written in polynomial form


N = an10n+ + a1101+ a0100 = ai10i
We have
ai represents the sum of all its digits.
Now the sum of its digits modulo 9 represents the REMAINDER of the division by 9,
and then we can write:
S ai mod 9
From the sum are automatically removed 9s and the digits that give as the sum 9 or
multiple, in that its congruence is 0, resulting in a neutral element in the sum that may
well be omitted.
If the sum S is equal to 0, 3 or 6 the number is divisible by 3.

Versione 1.0
2/10/2013
Pagina 5 di 74

1.2 PRODUCT OF THE DIGITS OF THE NUMBER N


Similarly, here we have:
N = an10n+ + a1101+ a0100 = ai10i
The product of all its digits is given by:
ai represents the product of all its digits.
Now the product of its digits in module 9 represents, also in this case, the remainder of
the division by 9, and then we can write:
P ai mod 9
In the product if it appears in the digits a 0 or a 9 or digits that give the product as 9
(3*3, 3*3*3, ) or multiple (6 * 3 6 * 6, ...), it is useless to continue to multiply his
figures because P = 0

Versione 1.0
2/10/2013
Pagina 6 di 74

From the product P can derive the following interesting table:


TAB 1:

At least 1 digit of N is 0 or 9 or 2 digits or more of


N are a multiple of 9 (3*3, 6*3, 3*3*6)
3, 6
Only 1 digit of N is 3 or 6
1, 4, 7 At least 1 digit of N is 1, 4, 7
2, 5, 8 At least 1 digit of N is 2, 5, 8
0

Last digit of
the
prime
number
1, 3, 7, 9
1, 3, 7
1, 7
1, 7

Note:
You cannot have a prime number N with last digit equal to 9 if its P = 3 or 6, because if
the last digit is 9 P values 0.
If P = 1, 2, 4, 5, 7 or 8, the last digit of the first number N is 1 or 7, because in this case
in the digits of N never appear either 0, 3, 6 or 9.
If P = 3 or 6 in the prime number N appears ONLY ONE digit that is 3 or 6.
All odd numbers N of the form 6k + 1, potentially prime numbers, or multiples or
powers of primes, which contain a 0, a 9, two 3's, a 6 and a 3, not necessarily
consecutive, have P = 0, since multiple 9, because 3 * 3 = 9, 6 * 3 = 18 multiple of 9,
while a 0 cancels the product of the digits of N.

Versione 1.0
2/10/2013
Pagina 7 di 74

1.3 ANALYSIS OF PAIRS S e P


Analyzing the S and P pairs of 1229 prime numbers less than 10,000, some pairs are
not present.
More specifically, the following 8 pairs S and P are NOT present:
S
1
5
7
7
1
2
4
4

P
1
1
1
2
4
4
4
7

In total there are 9 x 9 = 81 pairs, where 27 have S = S = 0, 3 and 6, which are multiples
of 3. There remain then 54 but ONLY 8 are not eligible to give prime numbers less than
10,000.
Thus, at least for N odd numbers lower than 10 000, such pairs are good only for a
deterministic test of "non primality".

Versione 1.0
2/10/2013
Pagina 8 di 74

But are we sure that continuing in our analysis also these 8 pairs do not emerge with
prime numbers greater than 10,000?
In fact here are some examples of prime numbers greater than 10,000 that "cover" the
remaining pairs of S and P.
TAB. 2
Prime
number
11251
11287
111827
12451
11281
11111
12877
111121

S
1
1
2
4
4
5
7
7

P
1
4
4
4
7
1
1
2

For pairs S and P (2,4) e (7,2) should even go to the prime numbers greater than
100,000
These pairs are very rare but are present.
The test is probabilistic but, like all other similar tests, inefficient to have certainty.

Versione 1.0
2/10/2013
Pagina 9 di 74

1.4 FURTHER INVESTIGATIONS


Prior to the following table for the first 1229 prime numbers up to 10 000, ie, (10 000)
= 1229, we make some example with primes of the form 6k + 1
Table 6k +1 to 25, except for the initial number 1, to understand the general trend of S
and P, to extending it to larger numbers in case of any possible regularity
In red numbers multiple of 3, which then will be eliminated, since they are never prime
numbers, except for the initial 3.
In blue the numbers of the form 6k + 1 which include prime numbers, and their products
and powers, that our test should not obviously give as prime, in black all other even
numbers and not prime, except for the initial 2 in the first column.

6k 4
S
2
2
8
8
14
5
20
2
26
8
32
5

6k-3
P S

2
8
4
0
3
6

3
3
9
9
15
6
21
3
27
9
33
6

6k-2
P S
4
3 4
10
9 1
16
5 7
22
2 4
28
0 1
34
0 7

6k-1
P S

4
0
6
4
7
3

6k
P S

5
5
5
11
2
1
17
8
7
23
5
6
29
2
0
35 compos.
8
6

6
6
12
3
18
9
24
6
30
3
36
9

6k+1
P S

6
2
8
8
0
0

7
7
7
13
4
3
19
1
9
25 compos.
7
1
31
4
3
37
1
3

Versione 1.0
2/10/2013
Pagina 10 di 74

Now we have the following sums S and products P, for each of the six numeric forms,
which contain all the numbers except the first initial of the form 6 * 0 +1 = 0 +1:
6k -2
S
2
8
5
2
8
5

P
2
8
4
0
3
6

6k-3
S
3
9
6
3
9
6

P
3
9
5
2
0
0

6k-4
S
4
1
7
4
1
7

P
4
0
6
4
7
3

6k-5
S
5
2
8
5
2
8

P
5
1
7
6
0
6

6k
S
6
3
9
6
3
9

P
6
2
8
8
0
0

6k+1
S
7
4
1
7
4
1

P
7
3
9
1
3
3

For our purposes only affect the columns in blue in which we note that the digits S are
repeated with the sequence 5 2 8
in column 6k -1 e 7 4 1
in column 6k + 1,
while for the products P such repetition does not exist or is not known, since a table
should be much longer, what we might see later.
The cyclicity of S is due to the fact that if a number N is added to a multiple k 'of 9,
with k = k*1,5 where k is the k of 6k + 1 returns to the original numerical root, for the
prime numbers, we are interested in this work, we have, starting from 5, 5 + 18 = 23,
with S = 2 +3 = 5 original, etc.
3+6 0 2*9 =18 = three lines, which is why every three lines repeats the same value of S.
For the products P it is more difficult.
For primes omirp, and those swappable, they all have the same pair, S and P, being the
sum and produced two commutative operations.
Eg. omirp numbers 37 and 73, with the same root number
S = 3 + 7 =7 + 3 = 10 = 1 + 0 =1 e
P = 3*7= 7*3 =21 = 2+1=3
We also note, and it is logical that in the column 6k + 1 S increased by 2 compared to
the S in the column 6k -1, being essendo 6k + 1 (6k -1) = 6k +1 - 6k +1 =1+ 1 = 2,
and taking into account the form if S +2 is two digits, eg. 8 in the third and sixth row, 8
+2 = 10 and 1 + 0 = 1, in fact 8 + 2 (mod 9) = 1.

Versione 1.0
2/10/2013
Pagina 11 di 74

Table of prime numbers up to 100 form 6 k -1 and relative values of S and P

Prime number of form


6k -1
5
11
17
23
29
35 composite, last digit 5
41
47
53
59
65 composite, last digit 5
71
77 composite = 7*11
83
89
95 composite, last digit 5
97
..

S cyclic: 8 5 2, 8 5 2

P not cyclic

5
2
8
5
2
8
5
2
8
5
2
8
5
2
8
5
2

5
1
7
6
9
6
4
1
6
9
3
7
4
6
9
9
9

We note, however, that some pairs of S and P, for example 8 and 6 are both prime
numbers (53), which for composite numbers, (35), as well as 5 e 9 for the first prime
number 59 that for the composite 95 .
Therefore, under this aspect, the prime numbers are not privileged by particular pairs of
S and P.

Versione 1.0
2/10/2013
Pagina 12 di 74

The same goes for prime numbers of the form 6k + 1

Prime number of form


6k +1
7
13
19
25 composite, last digit 5
31
37
43
49 composite = 7*7
55 composite, last digit 5
61
67
73
79
85 composite, last digit 5
91 composite =7*13
97

S cyclic: 7 4 1, 7 4 1

P not cyclic

7
4
1
7
4
1
7
4
1
7
4
1
7
4
1
7

7
3
9
1
3
3
3
9
7
6
6
3
9
4
9
6

Also here we have obviously the same phenomenon, but with the pair 1 9, for both the
prime number 19, for both the composite number 91.
But the following table, the result of an algorithm, shows all the 1229 prime numbers up
to 10000, with its pairs S and P, where we can observe the pair 8 and 6 occurs for some
of them.
Here, however, are obviously not present the composite numbers with pair 8 and 6, as
we have seen for the composite number 35 (8, 6) for the prime number 53 (permutation
of 35), 467, 647 (permutation of 467), 2861, 5651, while the pair (8, 0) is present for a
large number of prime numbers.
Then each pair would have its frequency, which ranges from a minimum of attendance
(zero prime numbers for the two pairs (2, 4), (7. 2) and high, as for example the couple

Versione 1.0
2/10/2013
Pagina 13 di 74

above (8, 0), there are already 16 appearances up to 1000 as the pair (8, 6) is present
only 5 times up to 10 000.

Versione 1.0
2/10/2013
Pagina 14 di 74

1.5 CONNECTION WITH PERFECT NUMBERS


The mathematical Sicilian Filippo Giordano noted that all perfect numbers, except for
the initial 6, have as the sum S = 1, for example, to 28, S = 2+8 = 10 = 1+ 0 =1, per
496, S = 4+9+6 = 19 = 1+ 9 = 10 = 1,etc.. (Ref. 2, "The odd perfect numbers", already
on our website. Perfect numbers, which are just the same, and the form 6k - 2, except
for the initial 6. Our demonstration Ref. 2).
In detail, the table for the first 10 perfect numbers with pairs S and P:
TAB. 3
PERFECT NUMBER

6
6
28
1
496
1
8128
1
33 550 336
1
8 589 869 056
1
137 438 691 328
1
2 305 843 008 139 952 128
1
2 658 455 991 569 831 744 654 692 615 953 842 176
1
191 561 942 608 236 107 294 793 378 084 303 638 130 997
1
321 548 169 216

6
7
0
2
0
0
0
0
0
0

The sum S = 1 because all perfect numbers are derived from the Mersenne numbers:
The perfect number is given by 2p1(2p1) with p prime number but all numbers of the
form 2m1(2m1) with m odd integer give the sum to S = 1.
In fact, for the only perfect number 6 does not work because p = 2 and it is not an odd
integer.

Versione 1.0
2/10/2013
Pagina 15 di 74

Moreover, all the perfect numbers end with digit 6 or 8.


By
2n (2n+1 - 1)
We have:
2n is even and ends with digit 2, 4, 8, 6
(2n+1 - 1) is odd and ends with digit 3, 7, 5, 1.
The value '5 'should be discarded as the hypothesis would fall primality, then the pairs
that remain are (2,3), (4,7) and (6,1), whose products give the numbers 6 and 8, last
digit of each perfect number.

Versione 1.0
2/10/2013
Pagina 16 di 74

2. CONCLUSIONS
There is NO probabilistic primality test secure and efficient way to determine whether a
number is prime or not.
The only certainty that we have is the following:
CONDITIONS NECESSARY BUT NOT SUFFICIENT to determine if a number N
is prime is that his last digit is equal to 1, 3, 7 or 9 and that the sum of its digits S is
not equal to 0, 3 or 6 because otherwise the number N is divisible by 3.
Equivalently we have that the only universal regularity that emerges is that all prime
numbers except 2 and 3 initials, are of the form 6k - 1 and 6k +1, since all other
possible forms (6k-4, 6k-3. 6k-2, 6k) formed from composite numbers.
There are no other conditions and assumptions.
The sequence of prime numbers is intrinsically linked to increase to infinity of natural
numbers N+ and is completely devoid of any rule, it is precisely this "no rule" that
distributes random prime numbers.

Even the famous Riemann hypothesis, surmising that it is true (it is yet to be proven)
does not lead to any connection of prime numbers with the placement of the zeros of the
Riemann zeta function.
Although the Real part of the zeros always worth , the Imaginary parts are of no help
to determine whether a number is prime or not.

Versione 1.0
2/10/2013
Pagina 17 di 74

In addition, the zeta function, useless as a primality test as discussed above, it is useless
even to give aid to the factorization, for example that of the RSA numbers, as is often
erroneously believed.
Some few algorithm assumes RH in truth there, but is not dangerous enough, in fact
encryption is RSA is still untouched. The zeta function does not give a list of prime
numbers, nor a list of pairs of prime numbers useful for this purpose. Lists of the pairs
give the twin primes conjecture, Goldbach's conjecture, Sophie Germain conjecture.
These conjectures are ongoing demonstration, with our contributions also present.
The products of two numbers twins of the same couple (or close to each other, ie with
difference 4, 6 etc..) are recognizable from the decimal part of their square root, very
high, eg. 0.999 ... and this type of product is easily factored by Fermat's algorithm used
in reverse, ie from the square root of N = p * q with p and q twins or very close. It is
located p immediately close to the square root of N (see our work on the assumption
percentage)

Versione 1.0
2/10/2013
Pagina 18 di 74

3. ANALYSIS OF 1229 PRIMES LESS THAN 10000


In Table 4 the complete list of pairs S and P 1229 for all prime numbers that are in the
range 2 ... 10000
TAB. 4
N
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

Prime Number
2
3
5
7
11
13
17
19
23
29
31
37
41
43
47
53
59
61
67
71
73
79
83
89
97
101

S
2
3
5
7
2
4
8
1
5
2
4
1
5
7
2
8
5
7
4
8
1
7
2
8
7
2

P
2
3
5
7
1
3
7
0
6
0
3
3
4
3
1
6
0
6
6
7
3
0
6
0
0
0

Versione 1.0
2/10/2013
Pagina 19 di 74

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

103
107
109
113
127
131
137
139
149
151
157
163
167
173
179
181
191
193
197
199
211
223
227
229
233
239
241
251
257
263
269
271
277
281
283
293

4
8
1
5
1
5
2
4
5
7
4
1
5
2
8
1
2
4
8
1
4
7
2
4
8
5
7
8
5
2
8
1
7
2
4
5

0
0
0
3
5
3
3
0
0
5
8
0
6
3
0
8
0
0
0
0
2
3
1
0
0
0
8
1
7
0
0
5
8
7
3
0

Versione 1.0
2/10/2013
Pagina 20 di 74

63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98

307
311
313
317
331
337
347
349
353
359
367
373
379
383
389
397
401
409
419
421
431
433
439
443
449
457
461
463
467
479
487
491
499
503
509
521

1
5
7
2
7
4
5
7
2
8
7
4
1
5
2
1
5
4
5
7
8
1
7
2
8
7
2
4
8
2
1
5
4
8
5
8

0
3
0
3
0
0
3
0
0
0
0
0
0
0
0
0
0
0
0
8
3
0
0
3
0
5
6
0
6
0
8
0
0
0
0
1

Versione 1.0
2/10/2013
Pagina 21 di 74

99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134

523
541
547
557
563
569
571
577
587
593
599
601
607
613
617
619
631
641
643
647
653
659
661
673
677
683
691
701
709
719
727
733
739
743
751
757

1
1
7
8
5
2
4
1
2
8
5
7
4
1
5
7
1
2
4
8
5
2
4
7
2
8
7
8
7
8
7
4
1
5
4
1

3
2
5
4
0
0
8
2
1
0
0
0
0
0
6
0
0
6
0
6
0
0
0
0
6
0
0
0
0
0
8
0
0
3
8
2

Versione 1.0
2/10/2013
Pagina 22 di 74

135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170

761
769
773
787
797
809
811
821
823
827
829
839
853
857
859
863
877
881
883
887
907
911
919
929
937
941
947
953
967
971
977
983
991
997
1009
1013

5
4
8
4
5
8
1
2
4
8
1
2
7
2
4
8
4
8
1
5
7
2
1
2
1
5
2
8
4
8
5
2
1
7
1
5

6
0
3
5
0
0
8
7
3
4
0
0
3
1
0
0
5
1
3
7
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Versione 1.0
2/10/2013
Pagina 23 di 74

171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206

1019
1021
1031
1033
1039
1049
1051
1061
1063
1069
1087
1091
1093
1097
1103
1109
1117
1123
1129
1151
1153
1163
1171
1181
1187
1193
1201
1213
1217
1223
1229
1231
1237
1249
1259
1277

2
4
5
7
4
5
7
8
1
7
7
2
4
8
5
2
1
7
4
8
1
2
1
2
8
5
4
7
2
8
5
7
4
7
8
8

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
7
6
0
5
6
0
7
8
2
0
0
6
5
3
0
6
6
0
0
8

Versione 1.0
2/10/2013
Pagina 24 di 74

207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242

1279
1283
1289
1291
1297
1301
1303
1307
1319
1321
1327
1361
1367
1373
1381
1399
1409
1423
1427
1429
1433
1439
1447
1451
1453
1459
1471
1481
1483
1487
1489
1493
1499
1511
1523
1531

1
5
2
4
1
5
7
2
5
7
4
2
8
5
4
4
5
1
5
7
2
8
7
2
4
1
4
5
7
2
4
8
5
8
2
1

0
3
0
0
0
0
0
0
0
6
6
0
0
0
6
0
0
6
2
0
0
0
4
2
6
0
1
5
6
8
0
0
0
5
3
6

Versione 1.0
2/10/2013
Pagina 25 di 74

243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278

1543
1549
1553
1559
1567
1571
1579
1583
1597
1601
1607
1609
1613
1619
1621
1627
1637
1657
1663
1667
1669
1693
1697
1699
1709
1721
1723
1733
1741
1747
1753
1759
1777
1783
1787
1789

4
1
5
2
1
5
4
8
4
8
5
7
2
8
1
7
8
1
7
2
4
1
5
7
8
2
4
5
4
1
7
4
4
1
5
7

6
0
3
0
3
8
0
3
0
0
0
0
0
0
3
3
0
3
0
0
0
0
0
0
0
5
6
0
1
7
6
0
1
6
5
0

Versione 1.0
2/10/2013
Pagina 26 di 74

279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314

1801
1811
1823
1831
1847
1861
1867
1871
1873
1877
1879
1889
1901
1907
1913
1931
1933
1949
1951
1973
1979
1987
1993
1997
1999
2003
2011
2017
2027
2029
2039
2053
2063
2069
2081
2083

1
2
5
4
2
7
4
8
1
5
7
8
2
8
5
5
7
5
7
2
8
7
4
8
1
5
4
1
2
4
5
1
2
8
2
4

0
8
3
6
8
3
3
2
6
5
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Versione 1.0
2/10/2013
Pagina 27 di 74

315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350

2087
2089
2099
2111
2113
2129
2131
2137
2141
2143
2153
2161
2179
2203
2207
2213
2221
2237
2239
2243
2251
2267
2269
2273
2281
2287
2293
2297
2309
2311
2333
2339
2341
2347
2351
2357

8
1
2
5
7
5
7
4
8
1
2
1
1
7
2
8
7
5
7
2
1
8
1
5
4
1
7
2
5
7
2
8
1
7
2
8

0
0
0
2
6
0
6
6
8
6
3
3
0
0
0
3
8
3
0
3
2
6
0
3
5
8
0
0
0
6
0
0
6
6
3
3

Versione 1.0
2/10/2013
Pagina 28 di 74

351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386

2371
2377
2381
2383
2389
2393
2399
2411
2417
2423
2437
2441
2447
2459
2467
2473
2477
2503
2521
2531
2539
2543
2549
2551
2557
2579
2591
2593
2609
2617
2621
2633
2647
2657
2659
2663

4
1
5
7
4
8
5
8
5
2
7
2
8
2
1
7
2
1
1
2
1
5
2
4
1
5
8
1
8
7
2
5
1
2
4
8

6
6
3
0
0
0
0
8
2
3
6
5
8
0
3
6
5
0
2
3
0
3
0
5
8
0
0
0
0
3
6
0
3
6
0
0

Versione 1.0
2/10/2013
Pagina 29 di 74

387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422

2671
2677
2683
2687
2689
2693
2699
2707
2711
2713
2719
2729
2731
2741
2749
2753
2767
2777
2789
2791
2797
2801
2803
2819
2833
2837
2843
2851
2857
2861
2879
2887
2897
2903
2909
2917

7
4
1
5
7
2
8
7
2
4
1
2
4
5
4
8
4
5
8
1
7
2
4
2
7
2
8
7
4
8
8
7
8
5
2
1

3
3
0
6
0
0
0
0
5
6
0
0
6
2
0
3
3
2
0
0
0
0
0
0
0
3
3
8
2
6
0
5
0
0
0
0

Versione 1.0
2/10/2013
Pagina 30 di 74

423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458

2927
2939
2953
2957
2963
2969
2971
2999
3001
3011
3019
3023
3037
3041
3049
3061
3067
3079
3083
3089
3109
3119
3121
3137
3163
3167
3169
3181
3187
3191
3203
3209
3217
3221
3229
3251

2
5
1
5
2
8
1
2
4
5
4
8
4
8
7
1
7
1
5
2
4
5
7
5
4
8
1
4
1
5
8
5
4
8
7
2

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
6
0
0
0
0
6
6
0
0
0
6
3
0
3

Versione 1.0
2/10/2013
Pagina 31 di 74

459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494

3253
3257
3259
3271
3299
3301
3307
3313
3319
3323
3329
3331
3343
3347
3359
3361
3371
3373
3389
3391
3407
3413
3433
3449
3457
3461
3463
3467
3469
3491
3499
3511
3517
3527
3529
3533

4
8
1
4
5
7
4
1
7
2
8
1
4
8
2
4
5
7
5
7
5
2
4
2
1
5
7
2
4
8
7
1
7
8
1
5

0
3
0
6
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
6
0
0
0
0
0
0
6
6
3
0
0

Versione 1.0
2/10/2013
Pagina 32 di 74

495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530

3539
3541
3547
3557
3559
3571
3581
3583
3593
3607
3613
3617
3623
3631
3637
3643
3659
3671
3673
3677
3691
3697
3701
3709
3719
3727
3733
3739
3761
3767
3769
3779
3793
3797
3803
3821

2
4
1
2
4
7
8
1
2
7
4
8
5
4
1
7
5
8
1
5
1
7
2
1
2
1
7
4
8
5
7
8
4
8
5
5

0
6
6
3
0
6
3
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
6
0
0
0
0
0
0
0
0
0
3

Versione 1.0
2/10/2013
Pagina 33 di 74

531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566

3823
3833
3847
3851
3853
3863
3877
3881
3889
3907
3911
3917
3919
3923
3929
3931
3943
3947
3967
3989
4001
4003
4007
4013
4019
4021
4027
4049
4051
4057
4073
4079
4091
4093
4099
4111

7
8
4
8
1
2
7
2
1
1
5
2
4
8
5
7
1
5
7
2
5
7
2
8
5
7
4
8
1
7
5
2
5
7
4
7

0
0
6
3
0
0
6
3
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
4

Versione 1.0
2/10/2013
Pagina 34 di 74

567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602

4127
4129
4133
4139
4153
4157
4159
4177
4201
4211
4217
4219
4229
4231
4241
4243
4253
4259
4261
4271
4273
4283
4289
4297
4327
4337
4339
4349
4357
4363
4373
4391
4397
4409
4421
4423

5
7
2
8
4
8
1
1
7
8
5
7
8
1
2
4
5
2
4
5
7
8
5
4
7
8
1
2
1
7
8
8
5
8
2
4

2
0
0
0
6
5
0
7
0
8
2
0
0
6
5
6
3
0
3
2
6
3
0
0
6
0
0
0
6
0
0
0
0
0
5
6

Versione 1.0
2/10/2013
Pagina 35 di 74

603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638

4441
4447
4451
4457
4463
4481
4483
4493
4507
4513
4517
4519
4523
4547
4549
4561
4567
4583
4591
4597
4603
4621
4637
4639
4643
4649
4651
4657
4663
4673
4679
4691
4703
4721
4723
4729

4
1
5
2
8
8
1
2
7
4
8
1
5
2
4
7
4
2
1
7
4
4
2
4
8
5
7
4
1
2
8
2
5
5
7
4

1
7
8
2
0
2
6
0
0
6
5
0
3
2
0
3
3
3
0
0
0
3
0
0
0
0
3
3
0
0
0
0
0
2
6
0

Versione 1.0
2/10/2013
Pagina 36 di 74

639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674

4733
4751
4759
4783
4787
4789
4793
4799
4801
4813
4817
4831
4861
4871
4877
4889
4903
4909
4919
4931
4933
4937
4943
4951
4957
4967
4969
4973
4987
4993
4999
5003
5009
5011
5021
5023

8
8
7
4
8
1
5
2
4
7
2
7
1
2
8
2
7
4
5
8
1
5
2
1
7
8
1
5
1
7
4
8
5
7
8
1

0
5
0
6
2
0
0
0
0
6
8
6
3
8
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Versione 1.0
2/10/2013
Pagina 37 di 74

675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710

5039
5051
5059
5077
5081
5087
5099
5101
5107
5113
5119
5147
5153
5167
5171
5179
5189
5197
5209
5227
5231
5233
5237
5261
5273
5279
5281
5297
5303
5309
5323
5333
5347
5351
5381
5387

8
2
1
1
5
2
5
7
4
1
7
8
5
1
5
4
5
4
7
7
2
4
8
5
8
5
7
5
2
8
4
5
1
5
8
5

0
0
0
0
0
0
0
0
0
6
0
5
3
3
8
0
0
0
0
5
3
0
3
6
3
0
8
0
0
0
0
0
6
3
3
3

Versione 1.0
2/10/2013
Pagina 38 di 74

711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746

5393
5399
5407
5413
5417
5419
5431
5437
5441
5443
5449
5471
5477
5479
5483
5501
5503
5507
5519
5521
5527
5531
5557
5563
5569
5573
5581
5591
5623
5639
5641
5647
5651
5653
5657
5659

2
8
7
4
8
1
4
1
5
7
4
8
5
7
2
2
4
8
2
4
1
5
4
1
7
2
1
2
7
5
7
4
8
1
5
7

0
0
0
6
5
0
6
6
8
6
0
5
8
0
3
0
0
0
0
5
8
3
2
0
0
3
2
0
0
0
3
3
6
0
6
0

Versione 1.0
2/10/2013
Pagina 39 di 74

747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782

5669
5683
5689
5693
5701
5711
5717
5737
5741
5743
5749
5779
5783
5791
5801
5807
5813
5821
5827
5839
5843
5849
5851
5857
5861
5867
5869
5879
5881
5897
5903
5923
5927
5939
5953
5981

8
4
1
5
4
5
2
4
8
1
7
1
5
4
5
2
8
7
4
7
2
8
1
7
2
8
1
2
4
2
8
1
5
8
4
5

0
0
0
0
0
8
2
6
5
6
0
0
3
0
0
0
3
8
2
0
3
0
2
5
6
6
0
0
5
0
0
0
0
0
0
0

Versione 1.0
2/10/2013
Pagina 40 di 74

783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818

5987
6007
6011
6029
6037
6043
6047
6053
6067
6073
6079
6089
6091
6101
6113
6121
6131
6133
6143
6151
6163
6173
6197
6199
6203
6211
6217
6221
6229
6247
6257
6263
6269
6271
6277
6287

2
4
8
8
7
4
8
5
1
7
4
5
7
8
2
1
2
4
5
4
7
8
5
7
2
1
7
2
1
1
2
8
5
7
4
5

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0
0
0
3
0
0
0
0
0
3
3
6
0
3
6
0
0
3
3
6

Versione 1.0
2/10/2013
Pagina 41 di 74

819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854

6299
6301
6311
6317
6323
6329
6337
6343
6353
6359
6361
6367
6373
6379
6389
6397
6421
6427
6449
6451
6469
6473
6481
6491
6521
6529
6547
6551
6553
6563
6569
6571
6577
6581
6599
6607

8
1
2
8
5
2
1
7
8
5
7
4
1
7
8
7
4
1
5
7
7
2
1
2
5
4
4
8
1
2
8
1
7
2
2
1

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
3
0
3
0
0
3
0
6
0
3
6
0
0
0
3
3
6
0
0

Versione 1.0
2/10/2013
Pagina 42 di 74

855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890

6619
6637
6653
6659
6661
6673
6679
6689
6691
6701
6703
6709
6719
6733
6737
6761
6763
6779
6781
6791
6793
6803
6823
6827
6829
6833
6841
6857
6863
6869
6871
6883
6899
6907
6911
6917

4
4
2
8
1
4
1
2
4
5
7
4
5
1
5
2
4
2
4
5
7
8
1
5
7
2
1
8
5
2
4
7
5
4
8
5

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0
0
0
0
6
0
0
3
6
0
0
3
0
0
0
0
0

Versione 1.0
2/10/2013
Pagina 43 di 74

891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926

6947
6949
6959
6961
6967
6971
6977
6983
6991
6997
7001
7013
7019
7027
7039
7043
7057
7069
7079
7103
7109
7121
7127
7129
7151
7159
7177
7187
7193
7207
7211
7213
7219
7229
7237
7243

8
1
2
4
1
5
2
8
7
4
8
2
8
7
1
5
1
4
5
2
8
2
8
1
5
4
4
5
2
7
2
4
1
2
1
7

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
5
8
0
8
0
1
5
0
0
5
6
0
0
6
6

Versione 1.0
2/10/2013
Pagina 44 di 74

927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962

7247
7253
7283
7297
7307
7309
7321
7331
7333
7349
7351
7369
7393
7411
7417
7433
7451
7457
7459
7477
7481
7487
7489
7499
7507
7517
7523
7529
7537
7541
7547
7549
7559
7561
7573
7577

2
8
2
7
8
1
4
5
7
5
7
7
4
4
1
8
8
5
7
7
2
8
1
2
1
2
8
5
4
8
5
7
8
1
4
8

5
3
3
0
0
0
6
0
0
0
6
0
0
1
7
0
5
8
0
4
8
2
0
0
0
2
3
0
6
5
8
0
0
3
6
5

Versione 1.0
2/10/2013
Pagina 45 di 74

963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998

7583
7589
7591
7603
7607
7621
7639
7643
7649
7669
7673
7681
7687
7691
7699
7703
7717
7723
7727
7741
7753
7757
7759
7789
7793
7817
7823
7829
7841
7853
7867
7873
7877
7879
7883
7901

5
2
4
7
2
7
7
2
8
1
5
4
1
5
4
8
4
1
5
1
4
8
1
4
8
5
2
8
2
5
1
7
2
4
8
8

3
0
0
0
0
3
0
0
0
0
0
3
3
0
0
0
1
6
2
7
6
5
0
0
0
5
3
0
8
3
3
6
8
0
3
0

Versione 1.0
2/10/2013
Pagina 46 di 74

999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034

7907
7919
7927
7933
7937
7949
7951
7963
7993
8009
8011
8017
8039
8053
8059
8069
8081
8087
8089
8093
8101
8111
8117
8123
8147
8161
8167
8171
8179
8191
8209
8219
8221
8231
8233
8237

5
8
7
4
8
2
4
7
1
8
1
7
2
7
4
5
8
5
7
2
1
2
8
5
2
7
4
8
7
1
1
2
4
5
7
2

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
2
3
8
3
3
2
0
0
0
0
5
3
0
3

Versione 1.0
2/10/2013
Pagina 47 di 74

1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070

8243
8263
8269
8273
8287
8291
8293
8297
8311
8317
8329
8353
8363
8369
8377
8387
8389
8419
8423
8429
8431
8443
8447
8461
8467
8501
8513
8521
8527
8537
8539
8543
8563
8573
8581
8597

8
1
7
2
7
2
4
8
4
1
4
1
2
8
7
8
1
4
8
5
7
1
5
1
7
5
8
7
4
5
7
2
4
5
4
2

3
0
0
3
5
0
0
0
6
6
0
0
0
0
6
3
0
0
3
0
6
6
5
3
3
0
3
8
2
3
0
3
0
3
5
0

Versione 1.0
2/10/2013
Pagina 48 di 74

1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106

8599
8609
8623
8627
8629
8641
8647
8663
8669
8677
8681
8689
8693
8699
8707
8713
8719
8731
8737
8741
8747
8753
8761
8779
8783
8803
8807
8819
8821
8831
8837
8839
8849
8861
8863
8867

4
5
1
5
7
1
7
5
2
1
5
4
8
5
4
1
7
1
7
2
8
5
4
4
8
1
5
8
1
2
8
1
2
5
7
2

0
0
0
6
0
3
3
0
0
3
6
0
0
0
0
6
0
6
6
8
2
3
3
0
3
0
0
0
2
3
3
0
0
6
0
6

Versione 1.0
2/10/2013
Pagina 49 di 74

1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142

8887
8893
8923
8929
8933
8941
8951
8963
8969
8971
8999
9001
9007
9011
9013
9029
9041
9043
9049
9059
9067
9091
9103
9109
9127
9133
9137
9151
9157
9161
9173
9181
9187
9199
9203
9209

4
1
4
1
5
4
5
8
5
7
8
1
7
2
4
2
5
7
4
5
4
1
4
1
1
7
2
7
4
8
2
1
7
1
5
2

2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Versione 1.0
2/10/2013
Pagina 50 di 74

1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178

9221
9227
9239
9241
9257
9277
9281
9283
9293
9311
9319
9323
9337
9341
9343
9349
9371
9377
9391
9397
9403
9413
9419
9421
9431
9433
9437
9439
9461
9463
9467
9473
9479
9491
9497
9511

5
2
5
7
5
7
2
4
5
5
4
8
4
8
1
7
2
8
4
1
7
8
5
7
8
1
5
7
2
4
8
5
2
5
2
7

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Versione 1.0
2/10/2013
Pagina 51 di 74

1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214

9521
9533
9539
9547
9551
9587
9601
9613
9619
9623
9629
9631
9643
9649
9661
9677
9679
9689
9697
9719
9721
9733
9739
9743
9749
9767
9769
9781
9787
9791
9803
9811
9817
9829
9833
9839

8
2
8
7
2
2
7
1
7
2
8
1
4
1
4
2
4
5
4
8
1
4
1
5
2
2
4
7
4
8
2
1
7
1
5
2

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Versione 1.0
2/10/2013
Pagina 52 di 74

1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229

9851
9857
9859
9871
9883
9887
9901
9907
9923
9929
9931
9941
9949
9967
9973

5
2
4
7
1
5
1
7
5
2
4
5
4
4
1

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Versione 1.0
2/10/2013
Pagina 53 di 74

OBSERVATIONS
We note the frequent series of consecutive primes with P = 0
Examples: (in red those close to a power of 10, except 10^1)
From 89 a 109, with 29-23 = 6 consecutive prime numbers containing the digit 9
From 349 to 419, with 81-69 = 12 consecutive numbers, starting with the digits 33 and
3*3 =9, with P = 0
From 907 a 1109, with 186 -154 = 32 consecutive primes, starting or containing the
digit 9
From 1879 to 2099, with 317-288 = 29 prime numbers containing a digit 9
Another group of consecutive prime numbers with P = 0 is located between 2897 and
3121, with 444-418 = 26 prime numbers, which also include the figure 9.
The most numerous series are close to a power of 10 (ie, a bit before and a little 'later,
like 6 prime numbers around 100).
32 around in 1000 and 122 before 10,000 since 1129-1107 = 122 consecutive prime
numbers, starting of course with 8, but contain the digit 9, or starting with 9. An 'other
small series after 10 000 will complete the series for the fourth power of 10 = 10 ^ 4.
Any number containing the digit 9, with regard to P = 0, multiplied by all the other
digits of the number to be always a multiple of 9, so being modulo 9 = 0, its product is
always P = 0.
The same is true also for the numbers, prime or not prime, containing two-digit 3, also
not consecutive, because 3 * 3 = 9, and then all the products with two 3 digits in the
factors are congruent modulo 9 and then P = 0, and so also the digits 3 and 6, since 6 * 3
= 18 multiple of 9, and then the even its products with other digits of the number, and
hence P = 0 in all these cases.

Versione 1.0
2/10/2013
Pagina 54 di 74

As before 1000 there are 14 consecutive primes with P = 0, and after there are 32-14 =
18, number a little 'more than 14 (as well as 100 there are two before and four after), it
is likely that even after 10 000 there are at least 122, and then in all at least 244, which
we could check it by extending the above table with at least 30 other prime numbers, all
with P = 0 if our observation was correct.

Summary:
neglecting the power 10 ^ 1 = 10, with the prime number 7 previous and 11 and 13 next,
respectively, with P = 7, 1 and 3, we have the following table for the three successive
powers 100, 1000 and 10 000:

P = 0 for next Total


prime numbers

> 2/100
10^n *

10^2
10^3
10^4

P = 0 for
previous prime
numbers
2
14
122

4
18
122 at least

6
32
244 at least

2
> 20
> 200

10^5

10^n

of

* This is because the last 10% up to 10 ^ n consists of all numbers starting with 9, and
then with P = 0, and the first 10% after 10 ^ n is composed of numbers starting with 10,
which have a 0, which implies a P = 0, since any number multiplied by 0 is 0.
For example, 1061, 1 * 0 * 6 * 1 = 0, the sum is 8, then we have the pair (8, 0), the most
common, in contrast to other, less frequent or rare, like mentioned before.

Versione 1.0
2/10/2013
Pagina 55 di 74

In this 20% of the total, the prime numbers are on average a little over a tenth, and then
we have a number of prime numbers equal to or slightly more than 2% of 10 ^ n.
Obviously, the phenomenon is repeated, more and more extended, for the subsequent
powers of 10. In this case, if an odd number to be tested nearby of any subsequent
power of 10 and P = 0, it is very likely that is also a prime number. Only the sum S = 0,
3, 6, excludes this possibility, as it would then be a number divisible by 3.
S fact must be 1, 2, 4, 5, 7, and 8
Here is a short table with the percentages for each pair S and P for the 25 prime
numbers up to 100. It may stretch up to 1000 to have a more accurate picture of pairs
with greater frequency or even up to 10 000. All pairs as possible relating to prime
numbers have a different frequency from one another (for example high for (8, 0), very
low for the two pairs (2, 4) and (7, 2) indicated at the beginning, and this involves the
irregularities on prime numbers, as logically one would expect.an average frequency
similar for all pairs S and P. Unless someone prove in the future a possible underlying
regularity, yet even glimpsed.
Frequency table for each pair S and P for the prime numbers from 2 to 100

Prime number up Pairs (S, P)


to 100
2
2 2
3
3 3
5
5 5
7
7 7
11
2 1
13
4 3
17
8 7
19
1 0
23
5 6
29
2 0
31
4 3

Total attendance
1
1
1
1
2
2
2
1
1
1
-

Frequencies%
Total *0,25
4
4
4
4
8
8
8
4
4
4
8

Versione 1.0
2/10/2013
Pagina 56 di 74

37
41
43
47
53
59
61
67
71
73
79
83
89
97

1 3
5 4
7 3
2 1
8 6
5 0
7 6
4 6
8 7
1 3
7 0
2 6
8 0
7 0

2
1
1
1
1
1
1
2
1
1
-

8
4
4
4
4
4
4

8
4
4

The pairs are repeated with different colors to highlight them better.
Obviously, the phenomenon is repeated, more and more extended, for the successive
powers of 10. In this case, if an odd number to be tested is in the vicinity of any
subsequent power of 10 and P = 0, is very likely to be a prime number.
Our primality test, therefore, remains probabilistic, although to a different extent for
each pair of S and P.

Versione 1.0
2/10/2013
Pagina 57 di 74

Note that the maximum number of prime numbers is had for P = 0.


In the first 10.000 numbers there are exactly 800 prime numbers with P = 0 (over 65%)
and this reinforces even more the previous reasoning.
The exact number of prime numbers with different values of P is given by the following
table
TAB 5:
P
0
1
2
3
4
5
6
7
8

Total
800
15
39
144
6
47
119
14
45

Note that for P = 4 (0.48%) and P = 7 (1.14%) and this shows that the probabilistic
point of view it is very likely that they are effectively primes.

Versione 1.0
2/10/2013
Pagina 58 di 74

Let us now see a table with S and P related to prime numbers and composite of form 6k
-1 and 6k +1
Table 6
6k
-1
primes
composite
S
P
5
5
5
11
2
1
17
8
7
23
5
6
29
11
2
35
8
6
41
5
4
47
2
1
53
8
6
59
5
0
65
2
3
71
8
7
77
5

and 6k+1
primes
composite
7
1
13
4
19
1
25
7
31
4
37
1
43
7
49
4
55
1
61
7
67

and Observations for the pairs


(S, P) for composite
numbers
7
3
0
1

3
3
3

73
1

79
7

Versione 1.0
2/10/2013
Pagina 59 di 74

83
2
89
8
95
5
101
2
107
8
113
5
119
2
125
8

0
0
0

0
3
0
1

85
5
91
1
97
7
103
4
109
1
115
7
121
4
127
1

In summary, S and P for the first 10 composite successive numbers of the form 6k -1 e
6k + 1, up to 127

Versione 1.0
2/10/2013
Pagina 60 di 74

Last column:

Versione 1.0
2/10/2013
Pagina 61 di 74

7
8
4
1
5
1
7
2
8

1 exists only once


6 exists only once
0 exists only once
7 exists only once
0 exists only once
0 exists only once
5 exists only once
0 exists only once
1 exists only once

Conclusions:
If a number N of such forms 6k-1 and 6k + 1 has one of these pairs, it is probably
composite. For example, we see the multiple of 7, then 7 * p
Table 7
7*p
35
49
77
91
119
161
203
217

Pairs S and P
8
6
4
0
5
0
1
0
2
0
8
6
5
0
1
5

Observations

Versione 1.0
2/10/2013
Pagina 62 di 74

Pairs for numbers N = 7*p


8
4
5
1
2
8
repetition
4
repetition

6
0
0
0
0
6
0

List of pairs for composite numbers (from Table 6)


7
8
4
1
5
1
7
2
8

1 exists only once


6 exists only once
0 exists only once
7 exists only once
0 there is twice
0 exists only once
5 exists only once
0 exists only once
1 exists only once

The two lists match, although in a different order, in the second list is missing 1 5,
which appears for the first time for
N = 7*31 =217
Same thing could be done to the multiple of 11, up to p = 31

Versione 1.0
2/10/2013
Pagina 63 di 74

11*p
55
77
121
143
187
209
253
341

Pairs S and P
1
7
5
0
4
2
8
3
7
2
2
0
1
3
8
3

Observations

Some couples (in brown) are repeated, others appear new (in purple)
Pairs (S, P)
1
5
4
8
7
2
1
8

7
0
2
3
2
0
3
3

The pairs (1, 7), (5, 0) and (2, 0) repeat for 11 * p, so there may be repeated for some of
the next multiple, and therefore are not evidence of their primality.
For example, extending the table to 11 * p, we have

Versione 1.0
2/10/2013
Pagina 64 di 74

11*p
55
77
121
143
187
209
253
341 (= 11*31)
Seconda parte
407 (=11*39)
451
473
517
561
737
781
803 (= 11*73)
869 (=11*79)

Pairs first part


Pairs (S, P
1
5
4
8
7
2
1

7
0
2
3
2
0
3

Pairs (S, P)
1
5
4
8
7
2
1
8
repetition
2
repetition
1
5
4
3
8
repetition
7
2
repetition
5
repetition

Observations
7
0
2
3
2
0
3
3

0
2
3
8
0
3
6
0
0

Versione 1.0
2/10/2013
Pagina 65 di 74

Pairs second part


2
repetition
1
5
4
3
8
repetition
7
2
repetition
5
repetition

0
2
3
8
0
3
6
0
0

(5. 0), (8, 3), (2, 0), are the pairs (S, P) most frequent for numbers N multiple of 11. For
example, if we have the number 1067 to be tested, we find the pair (5, 0), the second of
this list, and then 1067 may be not a prime number, and a multiple of 11, in fact 1067 =
11 * 97. Additional tables for multiple other primes might allow to identify their pairs
(S, P) "favorite", and testing them, we would find that often are not prime numbers, but
particular multiple of a prime number (11 in this case) Another example:
N = 1397,
a pair (2, 0), present a favorite of 11 * p
In fact, 1397 = 11 * 127.
These are useful, but not deterministic primality test or not primality test.

Versione 1.0
2/10/2013
Pagina 66 di 74

CONCLUSIONS
On this work we have discovered something about the primality test, which may be
explored in the future with both our or others further research.

Versione 1.0
2/10/2013
Pagina 67 di 74

4. REFERENCES
1a) Test di primalit AKS, da Wikipedia :
Algoritmo AKS
Da Wikipedia, l'enciclopedia libera.
Questa voce sull'argomento teoria dei numeri solo un abbozzo.
Contribuisci a migliorarla secondo le convenzioni di Wikipedia.
L'algoritmo AKS (dalle iniziali dei tre ideatori, i matematici indiani Manindra Agrawal,
Neeraj Kayal e Nitin Saxena) un test di primalit di complessit polinomiale. In
particolare, l'algoritmo ha tempo di esecuzione O(log12+ n), mentre una variante
proposta nel 2005 da Carl Pomerance e Hendrik Lenstra ha complessit O(log6+ n)
Pubblicato nel 2002, ha fruttato ai suoi scopritori diversi premi, tra cui il premio Gdel
e il premio Fulkerson nel 2006.

1b) AKS primality test


(in inglese)
From Wikipedia, the free encyclopedia
Jump to: navigation, search
The AKS primality test (also known as AgrawalKayalSaxena primality test and
cyclotomic AKS test) is a deterministic primality-proving algorithm created and
published by Manindra Agrawal, Neeraj Kayal, and Nitin Saxena, computer scientists at
the Indian Institute of Technology Kanpur, on August 6, 2002, in a paper titled
"PRIMES is in P".[1] The algorithm determines whether a number is prime or composite
within polynomial time. The authors received the 2006 Gdel Prize and the 2006
Fulkerson Prize for this work.
Contents
1 Importance
2 Concepts
3 History and running time
4 Algorithm
5 References
6 Further reading
7 External links

Versione 1.0
2/10/2013
Pagina 68 di 74

Importance
AKS is the first primality-proving algorithm to be simultaneously general, polynomial,
deterministic, and unconditional. Previous algorithms had been developed for centuries
but achieved three of these properties at most, but not all four.
The AKS algorithm can be used to verify the primality of any general number given.
Many fast primality tests are known that work only for numbers with certain properties.
For example, the LucasLehmer test for Mersenne numbers works only for Mersenne
numbers, while Ppin's test can be applied to Fermat numbers only.
The maximum running time of the algorithm can be expressed as a polynomial over the
number of digits in the target number. ECPP and APR conclusively prove or disprove
that a given number is prime, but are not known to have polynomial time bounds for all
inputs.
The algorithm is guaranteed to distinguish deterministically whether the target number
is prime or composite. Randomized tests, such as MillerRabin and BailliePSW, can
test any given number for primality in polynomial time, but are known to produce only
a probabilistic result.
The correctness of AKS is not conditional on any subsidiary unproven hypothesis. In
contrast, the Miller test is fully deterministic and runs in polynomial time over all
inputs, but its correctness depends on the truth of the yet-unproven generalized Riemann
hypothesis.
Concepts
The AKS primality test is based upon the following theorem: An integer n ( 2) is
prime if and only if the polynomial congruence relation
holds for all integers a coprime to n (or even just for some such integer a, in particular
for a = 1).[1] Note that x is a free variable. It is never substituted by a number; instead
you have to expand
and compare the coefficients of the x powers.
This theorem is a generalization to polynomials of Fermat's little theorem, and can
easily be proven using the binomial theorem together with the following property of the
binomial coefficient:
for all
if and only if n is prime.
While the relation (1) constitutes a primality test in itself, verifying it takes exponential
time. Therefore, to reduce the computational complexity, AKS makes use of the related
congruence

Versione 1.0
2/10/2013
Pagina 69 di 74

which is the same as:


for some polynomials f and g. This congruence can be checked in polynomial time with
respect to the number of digits in n, because it is provable that r need only be
logarithmic with respect to n. Note that all primes satisfy this relation (choosing g = 0 in
(3) gives (1), which holds for n prime). However, some composite numbers also satisfy
the relation. The proof of correctness for AKS consists of showing that there exists a
suitably small r and suitably small set of integers A such that, if the congruence holds
for all such a in A, then n must be prime.

2) I NUMERI PERFETTI DISPARI


(proposta di dimostrazione della loro inesistenza)
Gruppo B. Riemann
Michele Nardelli, Francesco Di Noto
Aggiungiamo un generatore di numeri primi creato da
(Marco
Cavicchioli)
e
pubblicato
sul
sito
(http://www.MarcoCavicchioli.it/numeri_primi_generatore.html
3) Generatore di numeri primi in Javascript
di Marco Cavicchioli
Inserire un numero intero positivo (N) maggiore di 1 nel seguente campo e cliccare su
"Genera":
Inizio modulo
79

N=
Fine modulo
Una volta cliccato su "Genera" un codice Javascript estrarr dalla successione dei
numeri interi positivi minori o uguali a N l'elenco dei numeri primi in essa riconosciuti.
Dato che la funzione Javascript che esegue ci genera (n-1) successioni da (n-1) a (n-1)2
la sua esecuzione risulta molto lenta per N molto alti (per esempio oltre 1000).
Da questo elenco convenzionalmente escluso il numero 1, perch tutti i numeri interi
positivi sono multipli di 1.
Per vedere il codice Javascript sufficiente aprire questa pagina html con un editor di

Versione 1.0
2/10/2013
Pagina 70 di 74

testo. Per tenere questo codice il pi pulito possibile ho scelto di non includere in questa
pagina alcun elemento grafico.
Ovviamente tutto il materiale contenuto in questa pagina (sia testo che codice)
CopyLeft, ovvero disponibile liberamente a chiunque. L'autore tuttavia richiede
espressamente che, qualora venisse utilizzato, citato o ripubblicato, in ogni luogo e
forma, vengano sempre riportati con chiarezza ed evidenza il nome dell'autore (Marco
Cavicchioli) e l'url (http://www.MarcoCavicchioli.it/numeri_primi_generatore.html).
Questa pagina ottimizzata per Mozilla Firefox.
UPDATE: segnalo che stato pubblicato un TEOREMA FONDAMENTALE DEI
NUMERI PRIMI che merita di essere letto.
Descrizione della funzione
I numeri interi positivi maggiori di 1 sarebbero in realt tutti numeri multipli (di 1
stesso, che il primo numero intero positivo, e quello da cui vengono generati per
somma tutti gli altri numeri interi positivi). Per "numero primo" invece si intende un
numero che non multiplo (ovvero: un numero intero positivo o multiplo, o
primo). Faccio notare che, a rigor di logica, a questo punto 1 sarebbe l'unico numero
primo, perch l'unico a non essere multiplo (dato che tutti gli altri numeri interi positivi
sono perlomeno multipli di 1). Ma questo non esclude che si possa procedere lo stesso,
con un'apposita accortezza...
Estrarre la successione dei numeri primi minori o uguali a N pertanto significa estrarre
dalla successione di tutti i numeri interi positivi minori o uguali a N quelli che non siano
soltanto multipli di 1. Questo concetto presume che si escluda la possibilit che un
numero N possa essere multiplo di s stesso. Per tentare di convincervi di ci devo fare
un passo indietro.
Se accettiamo il presupposto che tutti i numeri interi positivi siano in realt funzioni di 1
(ovvero valori risultanti dall'applicazione di una data funzione somma al numero 1,
come se in realt esistessero solo due numeri "primordiali", 0 e 1, con tutti i restanti
numeri interi superiori in realt ricavati da somme di 1, e pertanto "multipli di 1") allora
tutti i numeri interi positivi, con l'esclusione di 1, sarebbero somme di "uni" (es. 2=1+1,
3=1+1+1, 7=1+1+1+1+1+1+1, ecc.). A questo punto potremmo definire "multipli"
(sempre con l'esclusione di 1 stesso) tutti i numeri interi positivi che si ottengono
sommando ripetutamente dei "pattern di uni". Per pattern di uni intendo sequenze
identiche ripetute di n uni (ad esempio (1+1+1)+(1+1+1)+(1+1+1)=9 dimostra che 9
un numero multiplo). Se imponiamo che, in questo caso, n sia superiore a 1 allora
otteniamo che i numeri primi sono quei numeri che non si ottengono da somme
ripetute di pattern di n uni, con n>1. Il fatto che sia richiesto che tali somme sano

Versione 1.0
2/10/2013
Pagina 71 di 74

ripetute esclude che un numero intero positivo N possa essere multiplo di s stesso,
perch in questo caso il pattern di uni non potrebbe essere ripetutamente sommato per
ottenere N, se n vale N.
Pertanto posso ora elencare alcune considerazioni importanti:
i numeri multipli sono quei numeri interi positivi che si ottengono da somme ripetute di
pattern di n uni, con n>1
dato che tali somme di pattern devono essere ripetute, un numero intero positivo N non
pu essere multiplo di s stesso, perch n deve essere minore di N (n<N)
i numeri primi sono pertanto i numeri interi positivi maggiori di 1 che non sono multipli
1 non n primo, n multiplo, ma "primordiale"
0 l'unico altro numero "primordiale"
Faccio notare come, a questo punto, non abbia senso cercare direttamente la successione
dei numeri primi, perch questi non sono altro che i numeri interi positivi minori o
uguali a N risultanti dall'esclusione dei numeri multipli (seguendo la definizione di
"numeri multipli" appena data) dalla successione dei numeri interi positivi interi minori
o uguali a N. Tale procedimento, in realt, gi ampiamente conosciuto con il nome di
"crivello di Eratostene"). La funzione Javascript che ho scritto solamente una versione
semplificata (e ridotta al minimo, per quanto ho potuto) del crivello. Ciononostante la
ritengo interessante perch, se fosse riscritta in termini matematici, credo potrebbe
essere utilizzata per scrivere una specie di funzione inversa che, a partire dal "crivello
semplificato" generi la sequenza dei numeri primi (un po' come ho fatto io con questa
funzione, che di fatto funziona proprio in questo modo - ovvero per esclusione).
Il codice Javascript inserito in questa pagina funziona cos:
al click sul tasto "Genera" viene lanciata una funzione di controllo che verifica che il
dato inserito nel campo (N) sia un numero intero positivo maggiore di 1;
se non vengono riconosciuti errori il codice procede al calcolo dei numeri interi positivi
"multipli" (seguendo la definizione appena data) fino a N, lanciando l'apposita funzione
multipli_genera;
una volta terminato di calcolare la successione dei numeri multipli fino ad N viene
lanciata la funzione di stampa dei risultati ottenuti che elenca tutti i numeri interi
positivi fino ad N verificando, per ogni numero, se incluso nella successione dei
numeri multipli appena generata, oppure no (in questo caso, e soltanto in questo caso, il
numero primo!).
La funzione di stampa pertanto riporta a video la successione dei numeri primi (e quella
dei numeri multipli).
La funzione multipli_genera funziona cos:

Versione 1.0
2/10/2013
Pagina 72 di 74

per ogni numero n compreso tra 2 ed N la funzione prende in considerazione il fattore


n-1;
per ogni fattore f (f=n-1) ne calcola il quadrato f2;
per ogni fattore calcola tutti i suoi multipli m a partire da m= f*2 fino a m=f2 (con
m<=N);
per ogni multiplo m verifica che non sia gi stato calcolato da un fattore f precedente;
nel caso che il multiplo m non sia gi stato calcolato lo memorizza nell'array
numeri_multipli, e memorizza il fattore f che lo ha generato nell'array
numeri_multipli_fattori, con lo stesso numero di indice;
in questo modo, alla fine, per ogni fattore f (dove f=n-1), verranno calcolati tutti i suoi
multipli m fino ad N, e memorizzati singolarmente nell'array dei numeri multipli uguali
o inferiori ad N, in modo che, in questo array, alla fine sar memorizzata l'intera
successione crescente dei singoli numeri multipli maggiori di 1 e minori o uguali ad N.
In realt, oltre a calcolare la successione di numeri multipli da 1 fino ad N,
multipli_genera in grado di calcolare anche la funzione "pi greco di N" (ovvero il
numero di numeri primi uguali o inferiori ad N), che non sar altro che la differenza tra
N ed il numero di multipli calcolati (a cui a dire il vero va ancora sottratto 1 per
escludere dal conteggio il numero 1).
Per dimostrare che questo sistema pare funzionare ho realizzato un file di Excel che
visualizza la successione dei numeri interi positivi fino a N=49, segnando in rosso quelli
che sono multipli; accanto ad ogni numero n ho riportato il fattore f=n-1, sotto il quale
ho incolonnato una successione di f fino a n2, segnando f in rosso quando genera un
multiplo. Lo schema che ne risulta d gli stessi risultati della funzione multipli_genera
per N=49, come potete facilmente verificare inserendo 49 nel campo in alto e cliccando
su "Genera": nella tabella dei fattori che comparir sotto l'elenco dei numeri primi
verranno infatti riportati gli stessi dati, seppure in forma diversa.
Ovviamente sono molto graditi domande, segnalazioni, idee, commenti, ecc. (scriveteli
a posta@marcocavicchioli.it).
PS: ho scritto questa funzione dopo aver letto il libro "L'ossessione dei numeri primi" di
John Derbyshire.
Elenco dei 22 numeri primi da 2 a 79
N N primi N multipli
Posizione
2 2
1
3 3
2
4
4 (multiplo di 2)
5 5
3

Versione 1.0
2/10/2013
Pagina 73 di 74

6
7 7
8
9
10
11 11
12
13 13
14
15
16

6 (multiplo di 3)
4
8 (multiplo di 4)
9 (multiplo di 3)
10 (multiplo di 5)
5
12 (multiplo di 4)
6
14 (multiplo di 7)
15 (multiplo di 5)
16 (multiplo di 4)

Ma ricordiamo anche la nostra regola aritmetica per trovare tutti i numeri


primi (ma anche loro prodotti e potenze), basata sulle somme progressive
1 + 4 + 2 + 4 + 2
Per esempio
1+4=5
1+4+2=7
1 + 4 + 2 + 4 = 11
ecc. ecc. :

Versione 1.0
2/10/2013
Pagina 74 di 74

4) REGOLA UNIVERSALE PER TROVARE TUTTI I NUMERI


PRIMI
Ing. Pier Francesco Roggero, Dott. Michele Nardelli, Francesco Di Noto
gi sul nostro sito

http://nardelli.xoom.it/virgiliowizard/

You might also like