Development of |
|
liste_max:=100000; sieving:=proc (stelle, p) begin while (stelle<=liste_max) do erg:=liste[stelle]; while(erg mod p=0) do // Divison of the stored f(x) by the prime erg:=erg /p; end_while; liste[stelle]:=erg; stelle:=stelle+p; end_while; end_proc; // Calculation of the values of the polynom for x from 0 to liste_max for x from 0 to liste_max do p:=abs (a*x^2+b*x+c); while (p mod 2=0) p:=p/2; liste [x]:=p; end_for; for x from 0 to liste_max do p:=liste[x]; if (p>1) then // Printing the Primes print (x, p); // 1. Sieving sieving (x+p, p); t:=(-x-b/a) mod p;If you are interested in some better algorithms have a look at quadr_Sieb_x^2+1.php.
if t=0 then t:=p; end_if; // 2. Sieving sieving (t, p); end_if; end_for;
2. Mathematical background
Lemma: If p | f(x) then also p | f(x+p) and p | f(-x-b/a) a) p | f(x) <=> ax^2 + bx + c = 0 mod p p | f(x+p) <=> a(x+p)^2 + b(x+p) + c = 0 mod p <=> ax^2 + 2axp + ap^2 + bx + bp + c = 0 mod p <=> ax^2 + bx + c = 0 mod p Thus if p | f(x) then p | f(x+p) b) if b = 0 mod a p | f(x) <=> ax^2 + bx + c = 0 mod p p | f(-x-b/a) <=> a(-x-b/a)^2 + b(-x-b/a) + c = 0 mod p <=> ax^2 + 2bx + b^2/a - bx - b^2/a + c = 0 mod p <=> ax^2 + bx + c = 0 mod p Thus if p | f(x) then p | f(-x-b/a)3. Correctness of the algorithm
The proof for this polynom is similar to the proof for the polynom f(x)=x^2-4x+1. a) First terms for the polynom f(x) = x^2+1
f(0)=1
f(1)=1
f(2)=5
f(3)=1
f(4)=17
f(5)=13
f(6)=37
f(7)=1
f(8)=1
f(9)=41
f(10)=101
f(11)=61
f(12)=29
f(13)=1
f(14)=197
f(15)=113
f(16)=257
f(17)=1
f(18)=1
f(19)=181
f(20)=401
f(21)=1
f(22)=97
f(23)=53
f(24)=577
f(25)=313
f(26)=677
f(27)=73
f(28)=157
f(29)=421
f(30)=1
f(31)=1
f(32)=1
f(33)=109
f(34)=89
f(35)=613
f(36)=1297
f(37)=137
f(38)=1
f(39)=761
f(40)=1601
f(41)=1
f(42)=353
f(43)=1
f(44)=149
f(45)=1013
f(46)=1
f(47)=1
f(48)=461
f(49)=1201
f(50)=1
f(51)=1301
f(52)=541
f(53)=281
f(54)=2917
f(55)=1
f(56)=3137
f(57)=1
f(58)=673
f(59)=1741
f(60)=277
f(61)=1861
f(62)=769
f(63)=397
f(64)=241
f(65)=2113
f(66)=4357
f(67)=449
f(68)=1
f(69)=2381
f(70)=1
f(71)=2521
f(72)=1
f(73)=1
f(74)=5477
f(75)=1
f(76)=1
f(77)=593
f(78)=1217
f(79)=3121
f(80)=173
f(81)=193
f(82)=269
f(83)=1
f(84)=7057
f(85)=3613
f(86)=569
f(87)=757
f(88)=1549
f(89)=233
f(90)=8101
f(91)=1
f(92)=1693
f(93)=1
f(94)=8837
f(95)=4513
f(96)=709
f(97)=941
f(98)=1
f(99)=1
b) Substitution of the polynom
The polynom f(x)=x^2+1 could be written as f(y)= y^2+1 with x=y+0
c) Backsubstitution Beside by backsubstitution you get an estimation for the huge of the primes with p | f(x) and p < f(x) f'(y)>(2y-1) with with y=x+0
f'(x)>2x-1 with x > 1
The first prime values for the polynom fx)=x^2+1 are f(0)=1 f(1)=2 f(2)=5 f(3)=1 f(4)=17 Supposing that the sequence f(5)-f(oo)=1 p1=2 p2=5 p3=17 are the first primes choose a special x1, x2 and x3 for the primes x1=2 x2=4 x3=5 (Other values are also possible, f(xi) should not be divisible by pi) With the help of the chinese remainder theorem you could solve the equitations : x=0 mod 2 f(0)=1 not divisible by 2 x=4 mod 5 f(4)=17 not divisible by 5 x=5 mod 17 f(5)=26 not divisible by 17 The solution is x=124 mod 170 f(124) is not divisible by the primes 2, 5, 17 f(124)=15377 which is by chance a primes. By this way you could calculate a special x taking the first primes of the sequence calculated by the algorithm and you get as result a special f(x) which is either a prime or consists of primes which are not yet in the sequence. Therefore the sequence of the reducible primes at least for the primes which appear as divisor of f(x) is infinite.
A | B | C | D | E | F | G | H | I | J | K | |
10^n | x | all Primes | P(x)=x^2+1 | P(x) | x^2+1 | C/B | D/B | E/B | C(n) / C(n-1) | D(n) / D(n-1) | E(n) / E(n-1) | |
1 | 10 | 7 | 5 | 2 | 0,700000 | 0,500000 | 0,200000 | ||||
2 | 100 | 70 | 19 | 51 | 0,700000 | 0,190000 | 0,510000 | 10,000000 | 3,800000 | 25,500000 | |
3 | 1.000 | 720 | 112 | 608 | 0,720000 | 0,112000 | 0,608000 | 10,285714 | 5,894737 | 11,921569 | |
4 | 10.000 | 7.102 | 841 | 6.261 | 0,710200 | 0,084100 | 0,626100 | 9,863889 | 7,508929 | 10,297697 | |
5 | 100.000 | 70.780 | 6.656 | 64.124 | 0,707800 | 0,066560 | 0,641240 | 9,966207 | 7,914388 | 10,241814 | |
6 | 1.000.000 | 704.537 | 54.110 | 650.427 | 0,704537 | 0,054110 | 0,650427 | 9,953899 | 8,129507 | 10,143269 | |
7 | 10.000.000 | 7.026.559 | 456.362 | 6.570.197 | 0,702656 | 0,045636 | 0,657020 | 9,973300 | 8,433968 | 10,101360 | |
8 | 100.000.000 | 70.122.424 | 3.954.181 | 66.168.243 | 0,701224 | 0,039542 | 0,661682 | 9,979625 | 8,664571 | 10,070968 | |
9 | 1.000.000.000 | 700.184.485 | 34.900.213 | 665.284.272 | 0,700184 | 0,034900 | 0,665284 | 9,985172 | 8,826155 | 10,054435 | |
10 | 10.000.000.000 | 6.993.568.566 | 312.357.934 | 6.681.210.632 | 0,699357 | 0,031236 | 0,668121 | 9,988180 | 8,950029 | 10,042640 | |
11 | 100.000.000.000 | 69.870.544.960 | 2.826.683.630 | 67.043.861.330 | 0,698705 | 0,028267 | 0,670439 | 9,990686 | 9,049502 | 10,034688 | |
12 | 1.000.000.000.000 | 698.175.242.376 | 25.814.570.672 | 672.360.671.704 | 0,698175 | 0,025815 | 0,672361 | 9,992412 | 9,132458 | 10,028669 |
A | B | C | D | E | F | G | H | I | J | K | |
2^n | x | all Primes | P(x)=x^2+1 | P(x) | x^2+1 | C/B | D/B | E/B | C(n) / C(n-1) | D(n) / D(n-1) | E(n) / E(n-1) | |
1 | 2 | 2 | 2 | 0 | 1,000000 | 1,000000 | 0,000000 | ||||
2 | 4 | 3 | 3 | 0 | 0,750000 | 0,750000 | 0,000000 | 1,500000 | 1,500000 | ||
3 | 8 | 5 | 4 | 1 | 0,625000 | 0,500000 | 0,125000 | 1,666667 | 1,333333 | ||
4 | 16 | 12 | 7 | 5 | 0,750000 | 0,437500 | 0,312500 | 2,400000 | 1,750000 | 5,000000 | |
5 | 32 | 22 | 10 | 12 | 0,687500 | 0,312500 | 0,375000 | 1,833333 | 1,428571 | 2,400000 | |
6 | 64 | 46 | 14 | 32 | 0,718750 | 0,218750 | 0,500000 | 2,090909 | 1,400000 | 2,666667 | |
7 | 128 | 90 | 24 | 66 | 0,703125 | 0,187500 | 0,515625 | 1,956522 | 1,714286 | 2,062500 | |
8 | 256 | 181 | 43 | 138 | 0,707031 | 0,167969 | 0,539063 | 2,011111 | 1,791667 | 2,090909 | |
9 | 512 | 364 | 70 | 294 | 0,710938 | 0,136719 | 0,574219 | 2,011050 | 1,627907 | 2,130435 | |
10 | 1.024 | 736 | 114 | 622 | 0,718750 | 0,111328 | 0,607422 | 2,021978 | 1,628571 | 2,115646 | |
11 | 2.048 | 1.459 | 212 | 1.247 | 0,712402 | 0,103516 | 0,608887 | 1,982337 | 1,859649 | 2,004823 | |
12 | 4.096 | 2.920 | 393 | 2.527 | 0,712891 | 0,095947 | 0,616943 | 2,001371 | 1,853774 | 2,026464 | |
13 | 8.192 | 5.810 | 713 | 5.097 | 0,709229 | 0,087036 | 0,622192 | 1,989726 | 1,814249 | 2,017016 | |
14 | 16.384 | 11.620 | 1.301 | 10.319 | 0,709229 | 0,079407 | 0,629822 | 2,000000 | 1,824684 | 2,024524 | |
15 | 32.768 | 23.198 | 2.459 | 20.739 | 0,707947 | 0,075043 | 0,632904 | 1,996386 | 1,890085 | 2,009788 | |
16 | 65.536 | 46.339 | 4.615 | 41.724 | 0,707077 | 0,070419 | 0,636658 | 1,997543 | 1,876779 | 2,011862 | |
17 | 131.072 | 92.654 | 8.418 | 84.236 | 0,706894 | 0,064224 | 0,642670 | 1,999482 | 1,824052 | 2,018886 | |
18 | 262.144 | 185.106 | 15.867 | 169.239 | 0,706123 | 0,060528 | 0,645596 | 1,997820 | 1,884890 | 2,009105 | |
19 | 524.288 | 369.794 | 29.843 | 339.951 | 0,705326 | 0,056921 | 0,648405 | 1,997742 | 1,880822 | 2,008704 | |
20 | 1.048.576 | 738.766 | 56.534 | 682.232 | 0,704542 | 0,053915 | 0,650627 | 1,997777 | 1,894381 | 2,006854 | |
21 | 2.097.152 | 1.476.544 | 106.787 | 1.369.757 | 0,704071 | 0,050920 | 0,653151 | 1,998663 | 1,888899 | 2,007758 | |
22 | 4.194.304 | 2.949.935 | 203.025 | 2.746.910 | 0,703319 | 0,048405 | 0,654914 | 1,997865 | 1,901215 | 2,005399 | |
23 | 8.388.608 | 5.894.833 | 387.308 | 5.507.525 | 0,702719 | 0,046171 | 0,656548 | 1,998293 | 1,907686 | 2,004989 | |
24 | 16.777.216 | 11.782.897 | 739.671 | 11.043.226 | 0,702315 | 0,044088 | 0,658228 | 1,998852 | 1,909775 | 2,005116 | |
25 | 33.554.432 | 23.550.908 | 1.416.635 | 22.134.273 | 0,701872 | 0,042219 | 0,659653 | 1,998737 | 1,915223 | 2,004330 | |
26 | 67.108.864 | 47.074.786 | 2.716.922 | 44.357.864 | 0,701469 | 0,040485 | 0,660984 | 1,998852 | 1,917870 | 2,004035 | |
27 | 134.217.728 | 94.099.962 | 5.218.926 | 88.881.036 | 0,701099 | 0,038884 | 0,662215 | 1,998946 | 1,920897 | 2,003727 | |
28 | 268.435.456 | 188.106.701 | 10.044.585 | 178.062.116 | 0,700752 | 0,037419 | 0,663333 | 1,999009 | 1,924646 | 2,003376 | |
29 | 536.870.912 | 376.049.307 | 19.352.155 | 356.697.152 | 0,700446 | 0,036046 | 0,664400 | 1,999128 | 1,926626 | 2,003218 | |
30 | 1.073.741.824 | 751.784.745 | 37.339.024 | 714.445.721 | 0,700154 | 0,034775 | 0,665379 | 1,999165 | 1,929450 | 2,002948 | |
31 | 2.147.483.648 | 1.503.000.381 | 72.139.395 | 1.430.860.986 | 0,699889 | 0,033593 | 0,666297 | 1,999243 | 1,932011 | 2,002757 | |
32 | 4.294.967.296 | 3.004.917.702 | 139.535.723 | 2.865.381.979 | 0,699637 | 0,032488 | 0,667149 | 1,999279 | 1,934251 | 2,002558 | |
33 | 8.589.934.592 | 6.007.850.623 | 270.187.320 | 5.737.663.303 | 0,699406 | 0,031454 | 0,667952 | 1,999339 | 1,936331 | 2,002408 | |
34 | 17.179.869.184 | 12.012.007.361 | 523.695.185 | 11.488.312.176 | 0,699191 | 0,030483 | 0,668708 | 1,999385 | 1,938267 | 2,002263 | |
35 | 34.359.738.368 | 24.017.148.553 | 1.016.029.276 | 23.001.119.277 | 0,698991 | 0,029570 | 0,669421 | 1,999428 | 1,940116 | 2,002132 | |
36 | 68.719.476.736 | 48.021.305.927 | 1.973.029.796 | 46.048.276.131 | 0,698802 | 0,028711 | 0,670091 | 1,999459 | 1,941903 | 2,002002 | |
37 | 137.438.953.472 | 96.018.463.670 | 3.834.641.365 | 92.183.822.305 | 0,698626 | 0,027901 | 0,670726 | 1,999497 | 1,943529 | 2,001895 | |
38 | 274.877.906.944 | 191.991.204.563 | 7.458.662.439 | 184.532.542.124 | 0,698460 | 0,027134 | 0,671325 | 1,999524 | 1,945074 | 2,001789 | |
39 | 549.755.813.888 | 383.896.376.530 | 14.518.923.631 | 369.377.452.899 | 0,698303 | 0,026410 | 0,671894 | 1,999552 | 1,946585 | 2,001693 | |
40 | 1.099.511.627.776 | 767.630.202.986 | 28.282.415.900 | 739.347.787.086 | 0,698156 | 0,025723 | 0,672433 | 1,999577 | 1,947969 | 2,001605 | |
41 | 2.199.023.255.552 | 1.534.954.071.943 | 55.130.064.461 | 1.479.824.007.482 | 0,698016 | 0,025070 | 0,672946 | 1,999601 | 1,949270 | 2,001526 |
A | B | C | D | E | F | G | H | I |
exponent =log2 (x) | <=x | number of primes with p=f(x) | number of primes with p=f(x) and p%6=1 | number of primes with p=f(x) and p%6=5 | number of primes with p=f(x) and p%8=1 | number of primes with p=f(x) and p%8=3 | number of primes with p=f(x) and p%8=5 | number of primes with p=f(x) and p%8=7 |
2 | 4 | 3 | 0 | 2 | 1 | 0 | 1 | 0 |
3 | 8 | 4 | 1 | 2 | 1 | 0 | 2 | 0 |
4 | 16 | 7 | 1 | 5 | 2 | 0 | 4 | 0 |
5 | 32 | 10 | 2 | 7 | 4 | 0 | 5 | 0 |
6 | 64 | 14 | 4 | 9 | 7 | 0 | 6 | 0 |
7 | 128 | 24 | 9 | 14 | 11 | 0 | 12 | 0 |
8 | 256 | 43 | 15 | 27 | 21 | 0 | 21 | 0 |
9 | 512 | 70 | 24 | 45 | 36 | 0 | 33 | 0 |
10 | 1.024 | 114 | 41 | 72 | 60 | 0 | 53 | 0 |
11 | 2.048 | 212 | 70 | 141 | 109 | 0 | 102 | 0 |
12 | 4.096 | 393 | 127 | 265 | 194 | 0 | 198 | 0 |
13 | 8.192 | 713 | 231 | 481 | 360 | 0 | 352 | 0 |
14 | 16.384 | 1.301 | 436 | 864 | 651 | 0 | 649 | 0 |
15 | 32.768 | 2.459 | 843 | 1.615 | 1.244 | 0 | 1.214 | 0 |
16 | 65.536 | 4.615 | 1.547 | 3.067 | 2.330 | 0 | 2.284 | 0 |
17 | 131.072 | 8.418 | 2.854 | 5.563 | 4.246 | 0 | 4.171 | 0 |
18 | 262.144 | 15.867 | 5.323 | 10.543 | 7.938 | 0 | 7.928 | 0 |
19 | 524.288 | 29.843 | 10.013 | 19.829 | 14.955 | 0 | 14.887 | 0 |
20 | 1.048.576 | 56.534 | 18.839 | 37.694 | 28.171 | 0 | 28.362 | 0 |
21 | 2.097.152 | 106.787 | 35.392 | 71.394 | 53.338 | 0 | 53.448 | 0 |
22 | 4.194.304 | 203.025 | 67.653 | 135.371 | 101.119 | 0 | 101.905 | 0 |
23 | 8.388.608 | 387.308 | 128.939 | 258.368 | 193.235 | 0 | 194.072 | 0 |
24 | 16.777.216 | 739.671 | 246.669 | 493.001 | 369.273 | 0 | 370.397 | 0 |
25 | 33.554.432 | 1.416.635 | 472.296 | 944.338 | 708.167 | 0 | 708.467 | 0 |
26 | 67.108.864 | 2.716.922 | 905.507 | 1.811.414 | 1.358.369 | 0 | 1.358.552 | 0 |
27 | 134.217.728 | 5.218.926 | 1.739.916 | 3.479.009 | 2.608.736 | 0 | 2.610.189 | 0 |
28 | 268.435.456 | 10.044.585 | 3.348.644 | 6.695.940 | 5.023.043 | 0 | 5.021.541 | 0 |
29 | 536.870.912 | 19.352.155 | 6.451.988 | 12.900.166 | 9.675.253 | 0 | 9.676.901 | 0 |
30 | 1.073.741.824 | 37.339.024 | 12.447.471 | 24.891.552 | 18.667.885 | 0 | 18.671.138 | 0 |
31 | 2.147.483.648 | 72.139.395 | 24.049.063 | 48.090.331 | 36.067.539 | 0 | 36.071.855 | 0 |
32 | 4.294.967.296 | 139.535.723 | 46.514.862 | 93.020.860 | 69.768.975 | 0 | 69.766.747 | 0 |
33 | 8.589.934.592 | 270.187.320 | 90.058.651 | 180.128.668 | 135.092.284 | 0 | 135.095.035 | 0 |
34 | 17.179.869.184 | 523.695.184 | 174.558.447 | 349.136.736 | 261.845.638 | 0 | 261.849.545 | 0 |
35 | 34.359.738.368 | 1.016.029.274 | 338.653.157 | 677.376.116 | 508.003.536 | 0 | 508.025.737 | 0 |
36 | 68.719.476.736 | 1.973.029.782 | 657.637.459 | 1.315.392.322 | 986.505.253 | 0 | 986.524.528 | 0 |
A | B | C | D | E | F | G | H | I |
exponent =log2 (x) | <=x | number of primes with p|f(x) | number of primes with p=f(x) and p%6=1 | number of primes with p=f(x) and p%6=5 | number of primes with p=f(x) and p%8=1 | number of primes with p=f(x) and p%8=3 | number of primes with p=f(x) and p%8=5 | number of primes with p=f(x) and p%8=7 |
2 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3 | 8 | 1 | 1 | 0 | 0 | 0 | 1 | 0 |
4 | 16 | 5 | 2 | 3 | 2 | 0 | 3 | 0 |
5 | 32 | 12 | 8 | 4 | 5 | 0 | 7 | 0 |
6 | 64 | 32 | 19 | 13 | 14 | 0 | 18 | 0 |
7 | 128 | 66 | 36 | 30 | 28 | 0 | 38 | 0 |
8 | 256 | 138 | 73 | 65 | 63 | 0 | 75 | 0 |
9 | 512 | 294 | 146 | 148 | 141 | 0 | 153 | 0 |
10 | 1.024 | 622 | 328 | 294 | 311 | 0 | 311 | 0 |
11 | 2.048 | 1.247 | 664 | 583 | 631 | 0 | 616 | 0 |
12 | 4.096 | 2.527 | 1.311 | 1.216 | 1.271 | 0 | 1.256 | 0 |
13 | 8.192 | 5.097 | 2.646 | 2.451 | 2.548 | 0 | 2.549 | 0 |
14 | 16.384 | 10.319 | 5.341 | 4.978 | 5.161 | 0 | 5.158 | 0 |
15 | 32.768 | 20.739 | 10.769 | 9.970 | 10.366 | 0 | 10.373 | 0 |
16 | 65.536 | 41.724 | 21.579 | 20.145 | 20.764 | 0 | 20.960 | 0 |
17 | 131.072 | 84.236 | 43.457 | 40.779 | 42.123 | 0 | 42.113 | 0 |
18 | 262.144 | 169.239 | 86.955 | 82.284 | 84.619 | 0 | 84.620 | 0 |
19 | 524.288 | 339.951 | 174.611 | 165.340 | 169.821 | 0 | 170.130 | 0 |
20 | 1.048.576 | 682.232 | 350.420 | 331.812 | 341.126 | 0 | 341.106 | 0 |
21 | 2.097.152 | 1.369.757 | 702.725 | 667.032 | 684.694 | 0 | 685.063 | 0 |
22 | 4.194.304 | 2.746.910 | 1.408.146 | 1.338.764 | 1.373.504 | 0 | 1.373.406 | 0 |
23 | 8.388.608 | 5.507.525 | 2.817.910 | 2.689.615 | 2.753.635 | 0 | 2.753.890 | 0 |
24 | 16.777.216 | 11.043.226 | 5.645.023 | 5.398.203 | 5.520.157 | 0 | 5.523.069 | 0 |
25 | 33.554.432 | 22.134.273 | 11.305.690 | 10.828.583 | 11.067.464 | 0 | 11.066.809 | 0 |
26 | 67.108.864 | 44.357.864 | 22.637.750 | 21.720.114 | 22.179.283 | 0 | 22.178.581 | 0 |
27 | 134.217.728 | 88.881.036 | 45.319.449 | 43.561.587 | 44.442.896 | 0 | 44.438.140 | 0 |
28 | 268.435.456 | 178.062.116 | 90.718.105 | 87.344.011 | 89.028.573 | 0 | 89.033.543 | 0 |
29 | 536.870.912 | 356.697.152 | 181.617.979 | 175.079.173 | 178.349.404 | 0 | 178.347.748 | 0 |
30 | 1.073.741.824 | 714.445.721 | 363.493.073 | 350.952.648 | 357.229.433 | 0 | 357.216.288 | 0 |
31 | 2.147.483.648 | 1.430.860.986 | 727.560.774 | 703.300.212 | 715.429.492 | 0 | 715.431.494 | 0 |
32 | 4.294.967.296 | 2.865.381.979 | 1.456.149.236 | 1.409.232.743 | 1.432.663.671 | 0 | 1.432.718.308 | 0 |
33 | 8.589.934.592 | 5.737.663.303 | 2.914.225.614 | 2.823.437.689 | 2.868.806.516 | 0 | 2.868.856.787 | 0 |
34 | 17.179.869.184 | 11.488.312.175 | 5.832.117.965 | 5.656.194.210 | 5.744.168.119 | 0 | 5.744.144.056 | 0 |
35 | 34.359.738.368 | 23.001.119.272 | 11.671.204.537 | 11.329.914.735 | 11.500.598.218 | 0 | 11.500.521.054 | 0 |
36 | 68.719.476.736 | 46.048.276.101 | 23.355.396.026 | 22.692.880.075 | 23.024.208.905 | 0 | 23.024.067.196 | 0 |