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 following proof does not mean that the primes of the form f(x)=x^2-4x+1 is infinitiv, but supposes that the primes of the form p | x^2-4x+1 is infinitiv. i would like to show that the result of the algorithm for f'(x) is either 1 or a prime and not a result of two primes. f'(x) is the value which is reduced by the primes of f(0) up to f'(x-1) according the algorithm above. The proof bases on the algorithm above especially that a prime p occurs periodically with periode p on the polynom. If p | f(x) then also p | f(x+p) a) As i regard f(x)=abs (x^2-4x+1) i check the sequence of primes up to the point that f(x)=x^2-4x+1 f(0)=1 f(1)=2 f(2)=3 f(3)=2 f(4)=1 f(x)>0 for x>=5 b) Substitution of the polynom The polynom f(x)=x^2-4x+1 could be written as f(y)=y^2-3 with x=y+2 Supposing that the values f(0), f'(1), f'(2), ..., f'(y-1) are either primes or 1. Supposing f'(y)=a*b, a, b element of N>1 f'(y) is the value which is reduced by the primes of f(0) up to f'(y-1) a>y-1 and b>y-1 because the values of f(0) up to f'(y-1) were already calculated by the algorithm if a<=y-1 or b<=y-1 then they would be eleminated by the algorithm before. ( if a<=y-1 then y-a>=1 that means f'(y-a) is a prime and was already sieved out by the algorithm before. ) The values of the polynom f(y) are symmetrical to the y-axis, that means f(-y)=f(y) Therefore a>2(y-1) and b>2(y-1) if a<=2(y-1) or b<=2(y-1) then they would be eleminated by the algorithm before. f(y)=abs(y^2-3) therefore f(0)=3 That means that you could add the nullpoint of the polynom to the estimation a>2(y-1)+1 and b>2(y-1)+1 <=> a>2y-1 and b>2y-1 Supposing f'(y)=a*b, a, b element of N>1 you could lead this equilation to a contradiction f'(y)>(2y-1)^2 <=> f'(y)>4y^2-4y+1 But f(y) is at least f(y)=y^2-4y+1 with y>=3 f'(y) would be greater than f(y) But this is a contradiction. Therefore the supposition is wrong and f'(y) is either 1 or a prime and not a result of two primes. 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) y=x-2 with x>=5 respectively y>=3 f'(x)>(2(x-2)-1) f'(x)> 2x-5 with x>=5
A | B | C | D | E | F | G | H | I | J | K |
|
10^n | x | all Primes | P(x)=x^2-4x+1 | P(x) | x^2-4x+1 | C/B | D/B | E/B | C(n) / C(n-1) | D(n) / D(n-1) | E(n) / E(n-1) |
|
1 | 10 | 6 | 4 | 2 | 0,600000 | 0,400000 | 0,200000 |
| |||
2 | 100 | 72 | 21 | 51 | 0,720000 | 0,210000 | 0,510000 | 12,000000 | 5,250000 | 25,500000 |
|
3 | 1.000 | 730 | 121 | 609 | 0,730000 | 0,121000 | 0,609000 | 10,138889 | 5,761905 | 11,941176 |
|
4 | 10.000 | 7.250 | 851 | 6.399 | 0,725000 | 0,085100 | 0,639900 | 9,931507 | 7,033058 | 10,507389 |
|
5 | 100.000 | 71.897 | 6.665 | 65.232 | 0,718970 | 0,066650 | 0,652320 | 9,916828 | 7,831962 | 10,194093 |
|
6 | 1.000.000 | 714.326 | 54.516 | 659.810 | 0,714326 | 0,054516 | 0,659810 | 9,935408 | 8,179445 | 10,114821 |
|
7 | 10.000.000 | 7.108.758 | 460.021 | 6.648.737 | 0,710876 | 0,046002 | 0,664874 | 9,951700 | 8,438275 | 10,076745 |
|
8 | 100.000.000 | 70.834.766 | 3.982.975 | 66.851.791 | 0,708348 | 0,039830 | 0,668518 | 9,964436 | 8,658246 | 10,054811 |
|
9 | 1.000.000.000 | 706.466.981 | 35.174.009 | 671.292.972 | 0,706467 | 0,035174 | 0,671293 | 9,973450 | 8,831090 | 10,041511 |
|
10 | 10.000.000.000 | 7.049.881.447 | 314.770.815 | 6.735.110.632 | 0,704988 | 0,031477 | 0,673511 | 9,979067 | 8,948960 | 10,033042 |
|
11 | 100.000.000.000 | 70.380.549.172 | 2.848.504.520 | 67.532.044.652 | 0,703805 | 0,028485 | 0,675320 | 9,983224 | 9,049456 | 10,026865 |
|
12 | 1.000.000.000.000 | 702.837.765.233 | 26.013.764.611 | 676.824.000.622 | 0,702838 | 0,026014 | 0,676824 | 9,986250 | 9,132429 | 10,022264 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A | B | C | D | E | F | G | H | I | J | K |
|
2^n | x | all Primes | P(x)=x^2-4x+1 | P(x) | x^2-4x+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 | 2 | 2 | 0 | 0,500000 | 0,500000 | 0,000000 | 1,000000 | 1,000000 |
| |
3 | 8 | 4 | 3 | 1 | 0,500000 | 0,375000 | 0,125000 | 2,000000 | 1,500000 |
| |
4 | 16 | 11 | 6 | 5 | 0,687500 | 0,375000 | 0,312500 | 2,750000 | 2,000000 | 5,000000 |
|
5 | 32 | 22 | 8 | 14 | 0,687500 | 0,250000 | 0,437500 | 2,000000 | 1,333333 | 2,800000 |
|
6 | 64 | 45 | 14 | 31 | 0,703125 | 0,218750 | 0,484375 | 2,045455 | 1,750000 | 2,214286 |
|
7 | 128 | 93 | 25 | 68 | 0,726563 | 0,195313 | 0,531250 | 2,066667 | 1,785714 | 2,193548 |
|
8 | 256 | 186 | 41 | 145 | 0,726563 | 0,160156 | 0,566406 | 2,000000 | 1,640000 | 2,132353 |
|
9 | 512 | 378 | 69 | 309 | 0,738281 | 0,134766 | 0,603516 | 2,032258 | 1,682927 | 2,131034 |
|
10 | 1.024 | 746 | 122 | 624 | 0,728516 | 0,119141 | 0,609375 | 1,973545 | 1,768116 | 2,019417 |
|
11 | 2.048 | 1.496 | 217 | 1.279 | 0,730469 | 0,105957 | 0,624512 | 2,005362 | 1,778689 | 2,049679 |
|
12 | 4.096 | 2.996 | 388 | 2.608 | 0,731445 | 0,094727 | 0,636719 | 2,002674 | 1,788018 | 2,039093 |
|
13 | 8.192 | 5.943 | 713 | 5.230 | 0,725464 | 0,087036 | 0,638428 | 1,983645 | 1,837629 | 2,005368 |
|
14 | 16.384 | 11.868 | 1.304 | 10.564 | 0,724365 | 0,079590 | 0,644775 | 1,996971 | 1,828892 | 2,019885 |
|
15 | 32.768 | 23.690 | 2.421 | 21.269 | 0,722961 | 0,073883 | 0,649078 | 1,996124 | 1,856595 | 2,013347 |
|
16 | 65.536 | 47.199 | 4.515 | 42.684 | 0,720200 | 0,068893 | 0,651306 | 1,992360 | 1,864932 | 2,006864 |
|
17 | 131.072 | 94.145 | 8.562 | 85.583 | 0,718269 | 0,065323 | 0,652946 | 1,994640 | 1,896346 | 2,005037 |
|
18 | 262.144 | 187.935 | 15.995 | 171.940 | 0,716915 | 0,061016 | 0,655899 | 1,996229 | 1,868138 | 2,009044 |
|
19 | 524.288 | 375.124 | 30.069 | 345.055 | 0,715492 | 0,057352 | 0,658140 | 1,996031 | 1,879900 | 2,006834 |
|
20 | 1.048.576 | 748.938 | 57.009 | 691.929 | 0,714243 | 0,054368 | 0,659875 | 1,996508 | 1,895939 | 2,005272 |
|
21 | 2.097.152 | 1.495.456 | 107.840 | 1.387.616 | 0,713089 | 0,051422 | 0,661667 | 1,996769 | 1,891631 | 2,005431 |
|
22 | 4.194.304 | 2.986.502 | 204.655 | 2.781.847 | 0,712038 | 0,048794 | 0,663244 | 1,997051 | 1,897765 | 2,004767 |
|
23 | 8.388.608 | 5.965.103 | 390.252 | 5.574.851 | 0,711096 | 0,046522 | 0,664574 | 1,997354 | 1,906877 | 2,004011 |
|
24 | 16.777.216 | 11.915.756 | 745.708 | 11.170.048 | 0,710234 | 0,044448 | 0,665787 | 1,997578 | 1,910837 | 2,003650 |
|
25 | 33.554.432 | 23.805.274 | 1.427.090 | 22.378.184 | 0,709452 | 0,042531 | 0,666922 | 1,997798 | 1,913738 | 2,003410 |
|
26 | 67.108.864 | 47.562.506 | 2.736.167 | 44.826.339 | 0,708737 | 0,040772 | 0,667965 | 1,997982 | 1,917305 | 2,003127 |
|
27 | 134.217.728 | 95.037.108 | 5.257.030 | 89.780.078 | 0,708082 | 0,039168 | 0,668914 | 1,998152 | 1,921312 | 2,002842 |
|
28 | 268.435.456 | 189.910.577 | 10.119.280 | 179.791.297 | 0,707472 | 0,037697 | 0,669775 | 1,998278 | 1,924904 | 2,002575 |
|
29 | 536.870.912 | 379.531.096 | 19.500.520 | 360.030.576 | 0,706932 | 0,036323 | 0,670609 | 1,998473 | 1,927066 | 2,002492 |
|
30 | 1.073.741.824 | 758.505.599 | 37.631.611 | 720.873.988 | 0,706413 | 0,035047 | 0,671366 | 1,998533 | 1,929775 | 2,002258 |
|
31 | 2.147.483.648 | 1.515.990.840 | 72.702.752 | 1.443.288.088 | 0,705938 | 0,033855 | 0,672083 | 1,998655 | 1,931960 | 2,002136 |
|
32 | 4.294.967.296 | 3.030.069.117 | 140.612.644 | 2.889.456.473 | 0,705493 | 0,032739 | 0,672754 | 1,998738 | 1,934076 | 2,001996 |
|
33 | 8.589.934.592 | 6.056.548.773 | 272.278.713 | 5.784.270.060 | 0,705075 | 0,031697 | 0,673378 | 1,998815 | 1,936374 | 2,001854 |
|
34 | 17.179.869.184 | 12.106.430.840 | 527.737.486 | 11.578.693.354 | 0,704687 | 0,030718 | 0,673969 | 1,998899 | 1,938225 | 2,001755 |
|
35 | 34.359.738.368 | 24.200.370.632 | 1.023.919.349 | 23.176.451.283 | 0,704323 | 0,029800 | 0,674524 | 1,998968 | 1,940206 | 2,001647 |
|
36 | 68.719.476.736 | 48.377.290.173 | 1.988.288.904 | 46.389.001.269 | 0,703982 | 0,028933 | 0,675049 | 1,999031 | 1,941841 | 2,001558 |
|
37 | 137.438.953.472 | 96.710.404.839 | 3.864.234.742 | 92.846.170.097 | 0,703661 | 0,028116 | 0,675545 | 1,999087 | 1,943498 | 2,001469 |
|
38 | 274.877.906.944 | 193.337.551.506 | 7.516.299.681 | 185.821.251.825 | 0,703358 | 0,027344 | 0,676014 | 1,999139 | 1,945094 | 2,001388 |
|
39 | 549.755.813.888 | 386.517.873.054 | 14.631.035.754 | 371.886.837.300 | 0,703072 | 0,026614 | 0,676458 | 1,999187 | 1,946574 | 2,001315 |
|
40 | 1.099.511.627.776 | 772.738.562.104 | 28.500.611.740 | 744.237.950.364 | 0,702802 | 0,025921 | 0,676880 | 1,999231 | 1,947956 | 2,001248 |
|
| |||||||||||
| |||||||||||