Różnica pomiędzy stronami "Testy pierwszości. Liczby pseudopierwsze Lucasa i liczby silnie pseudopierwsze Lucasa. Test BPSW" i "Ciągi liczbowe"

Z Henryk Dąbrowski
(Różnica między stronami)
Przejdź do nawigacji Przejdź do wyszukiwania
 
 
Linia 1: Linia 1:
<div style="text-align:right; font-size: 130%; font-style: italic; font-weight: bold;">11.01.2023</div>
+
<div style="text-align:right; font-size: 130%; font-style: italic; font-weight: bold;">12.03.2022</div>
  
 
__FORCETOC__
 
__FORCETOC__
Linia 5: Linia 5:
  
  
== Ciągi Lucasa ==
+
== Ciągi nieskończone ==
  
<span style="font-size: 110%; font-weight: bold;">Definicja L1</span><br/>
+
<span style="font-size: 110%; font-weight: bold;">Definicja C1</span><br/>
Niech <math>P, Q \in \mathbb{Z} \setminus \{0\}</math> oraz <math>D = P^2 - 4 Q \neq 0</math>. Ciągi Lucasa <math>U_n = U_n (P, Q)</math> i <math>V_n = V_n (P, Q)</math> definiujemy następująco
+
Niech <math>n \in \mathbb{Z}_+</math>. Jeżeli każdej liczbie <math>n</math> przypiszemy pewną liczbę rzeczywistą <math>a_n</math>, to powiemy, że liczby <math>a_1, a_2, \ldots, a_n, \ldots</math> tworzą ciąg nieskończony.
  
::<math>U_n = {\small\frac{\alpha^n - \beta^n}{\alpha - \beta}} = {\small\frac{\alpha^n - \beta^n}{\sqrt{D}}}</math>
 
  
::<math>V_n = \alpha^n + \beta^n</math>
 
  
gdzie liczby
+
<span style="font-size: 110%; font-weight: bold;">Uwaga C2</span><br/>
 +
Ciąg nieskończony <math>a_1, a_2, \ldots, a_n, \ldots</math> będziemy oznaczać <math>(a_n)</math>. Często, o&nbsp;ile nie będzie prowadziło to do nieporozumień, ciąg nieskończony będziemy nazywać po prostu ciągiem.
  
::<math>\alpha = {\small\frac{P + \sqrt{D}}{2}}</math>
 
  
::<math>\beta = {\small\frac{P - \sqrt{D}}{2}}</math>
 
  
są pierwiastkami równania <math>x^2 - P x + Q = 0</math>.
+
<span style="font-size: 110%; font-weight: bold;">Definicja C3</span><br/>
 +
Niech <math>n \in \mathbb{Z}_+</math>. Ciąg <math>(a_n)</math> będziemy nazywali
 +
::* ciągiem rosnącym, jeżeli dla każdego <math>n</math> jest <math>a_{n + 1} \geqslant a_n</math>
 +
::* ciągiem malejącym, jeżeli dla każdego <math>n</math> jest <math>a_{n + 1} \leqslant a_n</math>
  
 +
Ciągi rosnące dzielimy na
 +
:::* ciągi silnie rosnące, jeżeli dla każdego <math>n</math> jest <math>a_{n + 1} > a_n</math>
 +
:::* ciągi słabo rosnące, jeżeli istnieją takie <math>n</math>, że <math>a_{n + 1} = a_n</math>
  
 +
Ciągi malejące dzielimy na
 +
:::* ciągi silnie malejące, jeżeli dla każdego <math>n</math> jest <math>a_{n + 1} < a_n</math>
 +
:::* ciągi słabo malejące, jeżeli istnieją takie <math>n</math>, że <math>a_{n + 1} = a_n</math>
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L2</span><br/>
 
Zauważmy, że:
 
  
::<math>P = \alpha + \beta</math>
 
  
::<math>Q = \alpha \beta</math>
+
<span style="font-size: 110%; font-weight: bold;">Definicja C4</span><br/>
 +
Niech <math>\varepsilon \in \mathbb{R}_+</math>. Liczbę <math>a</math> będziemy nazywali granicą ciągu <math>(a_n)</math>, jeżeli dla dowolnego <math>\varepsilon</math> w&nbsp;przedziale <math>(a - \varepsilon, a + \varepsilon)</math> znajdują się '''prawie wszystkie wyrazy ciągu''' <math>(a_n)</math> (to znaczy wszystkie poza co najwyżej skończoną ilością).
  
::<math>\sqrt{D} = \alpha - \beta</math>
 
  
::<math>U_0 = 0</math>, <math>U_1 = 1</math>, <math>V_0 = 2</math> i <math>V_1 = P</math>
 
  
 +
<span style="font-size: 110%; font-weight: bold;">Uwaga C5</span><br/>
 +
1) sens definicji jest taki: jeżeli liczba <math>a</math> jest granicą ciągu <math>(a_n)</math>, to dla dowolnie małego <math>\varepsilon > 0</math>, poza przedziałem <math>(a - \varepsilon, a + \varepsilon)</math> może się znaleźć co najwyżej skończona ilość wyrazów ciągu <math>(a_n)</math>
  
Warunek <math>P^2 - 4 Q \neq 0</math> wyklucza następujące pary <math>(P, Q)</math>
+
2) słabsze żądanie, aby w&nbsp;przedziale <math>(a - \varepsilon, a + \varepsilon)</math> znajdowała się nieskończona ilość wyrazów ciągu nie prowadzi do poprawnej definicji granicy. Przykładowo, w&nbsp;przedziale <math>(1 - \varepsilon, 1 + \varepsilon)</math> znajduje się nieskończenie wiele wyrazów ciągu <math>a_n = (-1)^n</math>, ale ani liczba <math>1</math>, ani liczba <math>- 1</math> nie są granicami tego ciągu. O&nbsp;ciągu <math>a_n = (- 1)^n</math> mówimy, że nie ma granicy.
  
::<math>(0, 0), (\pm 2, 1), (\pm 4, 4), (\pm 6, 9), (\pm 8, 16), (\pm 10, 25), (\pm 12, 36), ..., (\pm 2 n, n^2), ...</math>
+
3) ze względu na równoważność warunków
  
 +
::* <math>\quad a_n \in (a - \varepsilon, a + \varepsilon)</math>
 +
::* <math>\quad a - \varepsilon < a_n < a + \varepsilon</math>
 +
::* <math>\quad - \varepsilon < a_n - a < \varepsilon</math>
 +
::* <math>\quad | a_n - a | < \varepsilon</math>
  
 +
definicja C4 może być wypowiedziana następująco
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L3</span><br/>
 
Oczywiście liczby <math>\alpha</math> i <math>\beta</math> są również pierwiastkami równania
 
  
::<math>x^{n + 2} - P x^{n + 1} + Q x^n = 0</math>
 
  
Wynika stąd, że ciągi <math>(\alpha^n)</math> i <math>(\beta^n)</math> spełniają równania rekurencyjne
+
<span style="font-size: 110%; font-weight: bold;">Definicja C6</span><br/>
 +
Liczbę <math>a</math> będziemy nazywali granicą ciągu <math>(a_n)</math>, jeżeli dla dowolnego <math>\varepsilon > 0</math> '''prawie wszystkie wyrazy ciągu''' <math>(a_n)</math> spełniają warunek <math>|a_n - a| < \varepsilon</math>.
  
::<math>\alpha^{n + 2} = P \alpha^{n + 1} - Q \alpha^n</math>
 
  
::<math>\beta^{n + 2} = P \beta^{n + 1} - Q \beta^n</math>
 
  
Ciągi Lucasa <math>(U_n)</math> i <math>(V_n)</math> spełniają identyczne równania rekurencyjne jak ciągi <math>(\alpha^n)</math> i <math>(\beta^n)</math>. Istotnie, odejmując i&nbsp;dodając stronami wypisane powyżej równania, otrzymujemy
+
<span style="font-size: 110%; font-weight: bold;">Definicja C7</span><br/>
 +
Ciąg <math>(a_n)</math> mający granicę (w rozumieniu definicji C4 lub C6) będziemy nazywali ciągiem zbieżnym, a&nbsp;fakt ten zapisujemy symbolicznie następująco
  
::<math>U_{n + 2} = P U_{n + 1} - Q U_n</math>
+
::<math>\lim_{n \to \infty} a_n = a</math>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lub&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<math>a_n \longrightarrow a</math>
  
::<math>V_{n + 2} = P V_{n + 1} - Q V_n</math>
+
(od łacińskiego słowa ''limes'' oznaczającego granicę).
  
Dlatego możemy zdefiniować ciągi Lucasa <math>(U_n)</math> i <math>(V_n)</math> w&nbsp;sposób równoważny
 
  
  
 +
Zauważmy jeszcze, że wprost z&nbsp;definicji granicy wynika</br>
 +
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C8</span><br/>
 +
::1. <math>\quad \lim_{n \to \infty} a_n = a \quad \iff \quad \lim_{n \to \infty} (a_n - a) = 0 \quad \iff \quad \lim_{n \to \infty} | a_n - a | = 0</math>
  
<span style="font-size: 110%; font-weight: bold;">Definicja L4</span><br/>
+
::2. <math>\quad \lim_{n \to \infty} a_n = 0 \quad \iff \quad \lim_{n \to \infty} | a_n | = 0</math>
Niech <math>P, Q \in \mathbb{Z} \setminus \{0\}</math> oraz <math>D = P^2 - 4 Q \neq 0</math>. Ciągi Lucasa <math>(U_n)</math> i <math>(V_n)</math> określone są następującymi wzorami rekurencyjnymi
 
  
::<math>U_0 = 0</math>, <math>U_1 = 1</math>, <math>U_n = P U_{n - 1} - Q U_{n - 2}</math>
+
::3. <math>\quad \lim_{n \to \infty} a_n = a \quad \implies \quad \lim_{n \to \infty} | a_n | = | a |</math>
  
::<math>V_0 = 2</math>, <math>V_1 = P</math>, <math>V_n = P V_{n - 1} - Q V_{n - 2}</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
'''Punkt 1.'''<br/>
 +
Prawdziwość twierdzenia wynika ze względu na identyczność warunków, które muszą spełniać prawie wszystkie wyrazy ciągu
  
 +
::<math>| a_n - a | < \varepsilon \quad \iff \quad | (a_n - a) - 0 | < \varepsilon \quad \iff \quad \big|| a_n - a | - 0 \big| < \varepsilon</math>
  
 +
'''Punkt 2.'''<br/>
 +
Jest to jedynie szczególny przypadek punktu 1. dla <math>a = 0</math>.
  
<span style="font-size: 110%; font-weight: bold;">Przykład L5</span><br/>
+
'''Punkt 3.'''<br/>
Początkowe wyrazy ciągów Lucasa
+
Dla dowolnych liczb <math>x, y \in \mathbb{R}</math> prawdziwa jest nierówność
  
::{| class="wikitable plainlinks"  style="font-size: 100%; text-align: left; margin-right: auto;"
+
::<math>\big|| x | - | y | \big| \leqslant |x - y|</math>
|-
 
! <math>\boldsymbol{n}</math> !! <math>\boldsymbol{U_n (P, Q)}</math> !! <math>\boldsymbol{V_n (P, Q)}</math>
 
|-
 
| &nbsp;&nbsp;<math>0</math>&nbsp;&nbsp; || <math>0</math> || <math>2</math>
 
|-
 
| &nbsp;&nbsp;<math>1</math>&nbsp;&nbsp; || <math>1</math> || <math>P</math>
 
|-
 
| &nbsp;&nbsp;<math>2</math>&nbsp;&nbsp; || <math>P</math> || <math>P^2 - 2 Q</math>
 
|-
 
| &nbsp;&nbsp;<math>3</math>&nbsp;&nbsp; || <math>P^2 - Q</math> || <math>P^3 - 3 P Q</math>
 
|-
 
| &nbsp;&nbsp;<math>4</math>&nbsp;&nbsp; || <math>P^3 - 2 P Q</math> || <math>P^4 - 4 P^2 Q + 2 Q^2</math>
 
|-
 
| &nbsp;&nbsp;<math>5</math>&nbsp;&nbsp; || <math>P^4 - 3 P^2 Q + Q^2</math> || <math>P^5 - 5 P^3 Q + 5 P Q^2</math>
 
|-
 
| &nbsp;&nbsp;<math>6</math>&nbsp;&nbsp; || <math>P^5 - 4 P^3 Q + 3 P Q^2</math> || <math>P^6 - 6 P^4 Q + 9 P^2 Q^2 - 2 Q^3</math>
 
|-
 
| &nbsp;&nbsp;<math>7</math>&nbsp;&nbsp; || <math>P^6 - 5 P^4 Q + 6 P^2 Q^2 - Q^3</math> || <math>P^7 - 7 P^5 Q + 14 P^3 Q^2 - 7 P Q^3</math>
 
|-
 
| &nbsp;&nbsp;<math>8</math>&nbsp;&nbsp; || <math>P^7 - 6 P^5 Q + 10 P^3 Q^2 - 4 P Q^3</math> || <math>P^8 - 8 P^6 Q + 20 P^4 Q^2 - 16 P^2 Q^3 + 2 Q^4</math>
 
|-
 
| &nbsp;&nbsp;<math>9</math>&nbsp;&nbsp; || <math>P^8 - 7 P^6 Q + 15 P^4 Q^2 - 10 P^2 Q^3 + Q^4</math> || <math>P^9 - 9 P^7 Q + 27 P^5 Q^2 - 30 P^3 Q^3 + 9 P Q^4</math>
 
|}
 
  
 +
Wynika stąd, że jeżeli dla prawie wszystkich wyrazów ciągu <math>(a_n)</math> spełniona jest nierówność <math>|a_n - a| < \varepsilon</math>, to tym bardziej prawdą jest, że <math>\big|| a_n | - | a |\big| < \varepsilon</math><br/>
 +
&#9633;
 +
{{\Spoiler}}
  
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L6</span><br/>
 
W PARI/GP możemy napisać prosty kod, który pozwoli obliczyć wartości wyrazów <math>U_n (P, Q)</math> i <math>V_n (P, Q)</math>
 
  
<span style="font-size: 90%; color:black;">LucasU(n, P, Q) = '''if'''( n == 0, 0, '''if'''( n == 1, 1, P*LucasU(n-1, P, Q) - Q*LucasU(n-2, P, Q) ) )</span>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C9 (twierdzenie o&nbsp;trzech ciągach)</span><br/>
 +
Jeżeli istnieje taka liczba całkowita <math>N_0</math>, że dla każdego <math>n > N_0</math> jest spełniony warunek
  
<span style="font-size: 90%; color:black;">LucasV(n, P, Q) = '''if'''( n == 0, 2, '''if'''( n == 1, P, P*LucasV(n-1, P, Q) - Q*LucasV(n-2, P, Q) ) )</span>
+
::<math>a_n \leqslant x_n \leqslant b_n</math>
  
 +
oraz
  
 +
::<math>\lim_{n \to \infty} a_n = \lim_{n \to \infty} b_n = g</math>
  
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L7</span><br/>
+
to <math>\lim_{n \to \infty} x_n = g</math>.
Niech <math>D = P^2 - 4 Q</math>. Wyrazy ciągów Lucasa można przedstawić w&nbsp;postaci sumy
 
 
 
::<math>2^{n - 1} U_n = \sum_{k = 0}^{\lfloor (n - 1) / 2 \rfloor} \binom{n}{2 k + 1} P^{n - 2 k - 1} D^k</math>
 
 
 
::<math>2^{n - 1} V_n = \sum_{k = 0}^{\lfloor n / 2 \rfloor} \binom{n}{2 k} P^{n - 2 k} D^k</math>
 
  
 
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
Oznaczmy <math>\delta = \sqrt{D}</math>, zatem <math>2 \alpha = P + \delta</math> i <math>2 \beta = P - \delta</math>. Ze wzoru dwumianowego, mamy
+
Niech <math>\varepsilon</math> będzie dowolną, ustaloną liczbą większą od <math>0</math>. Z&nbsp;założenia prawie wszystkie wyrazy ciągu <math>(a_n)</math> spełniają warunek <math>|a_n - g| < \varepsilon</math>. Możemy założyć, że są to wszystkie wyrazy, poczynając od wyrazu <math>N_a</math>. Podobnie prawie wszystkie wyrazy ciągu <math>(b_n)</math> spełniają warunek <math>|b_n - g| < \varepsilon</math> i&nbsp;podobnie możemy założyć, że są to wszystkie wyrazy, poczynając od wyrazu <math>N_b</math>
  
::<math>2^n \alpha^n = (P + \delta)^n = \sum_{j = 0}^{n} \binom{n}{j} P^{n - j} \delta^j</math>
+
Nierówność <math>a_n \leqslant x_n \leqslant b_n</math> jest spełniona dla wszystkich wyrazów, poczynając od <math>N_0</math>, zatem oznaczając przez <math>M</math> największą z&nbsp;liczb <math>N_a</math>, <math>N_b</math>, <math>N_0</math>, możemy napisać, że o&nbsp;ile <math>n > M</math>, to spełnione są jednocześnie nierówności
  
::<math>2^n \beta^n = (P - \delta)^n = \sum_{j = 0}^{n} \binom{n}{j} P^{n - j} (- \delta)^j</math>
+
::* <math>\quad g - \varepsilon < a_n < g + \varepsilon\</math>
 +
::* <math>\quad g - \varepsilon < b_n < g + \varepsilon\</math>
 +
::* <math>\quad a_n \leqslant x_n \leqslant b_n</math>
  
Obliczając sumę powyższych wzorów, otrzymujemy
+
Z powyższych nierówności wynika natychmiast następujący ciąg nierówności
  
::<math>2^n (\alpha^n + \beta^n) = \sum_{j = 0}^{n} \binom{n}{j} P^{n - j} (\delta^j + (- \delta)^j)</math>
+
::<math>g - \varepsilon < a_n \leqslant x_n \leqslant b_n < g + \varepsilon</math>
  
:::::<math>\quad \: = \sum_{k = 0}^{\lfloor n / 2 \rfloor} \binom{n}{2 k} P^{n - 2 k} \cdot 2 \delta^{2 k}</math>
+
Co oznacza, że dla <math>n > M</math> zachodzi
  
:::::<math>\quad \: = 2 \sum_{k = 0}^{\lfloor n / 2 \rfloor} \binom{n}{2 k} P^{n - 2 k} D^k</math>
+
::<math>g - \varepsilon < x_n < g + \varepsilon</math>
  
gdzie <math>j = 2 k</math> i&nbsp;sumowanie przebiega od <math>k = 0</math> do <math>k = \lfloor n / 2 \rfloor</math>
+
Czyli prawie wszystkie wyrazy ciągu <math>(x_n)</math> spełniają warunek <math>|x_n - g| < \varepsilon</math>. Co kończy dowód.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
Zatem
 
  
::<math>2^{n - 1} V_n = \sum_{k = 0}^{\lfloor n / 2 \rfloor} \binom{n}{2 k} P^{n - 2 k} D^k</math>
 
  
 +
Bez dowodu podamy kilka ważnych twierdzeń.<br>
 +
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C10*</span><br/>
 +
Jeżeli istnieje taka liczba całkowita <math>n</math> i&nbsp;rzeczywista <math>M</math>, że dla każdego <math>k > n</math> jest
  
Obliczając różnicę tych wzorów, mamy
+
::<math>a_{k + 1}\geqslant a_k \qquad</math> oraz <math>\qquad a_k \leqslant M</math>
  
::<math>2^n (\alpha^n - \beta^n) = \sum_{j = 0}^{n} \binom{n}{j} P^{n - j} (\delta^j - (- \delta)^j)</math>
+
to ciąg <math>(a_k)</math> jest zbieżny.<br/>
 +
'''Inaczej mówiąc: ciąg rosnący i&nbsp;ograniczony od góry jest zbieżny.'''
  
:::::<math>\quad \: = \sum_{k = 0}^{\lfloor (n - 1) / 2 \rfloor} \binom{n}{2 k + 1} P^{n - 2 k - 1} \cdot 2 \delta^{2 k + 1}</math>
 
  
:::::<math>\quad \: = 2 \delta \sum_{k = 0}^{\lfloor (n - 1) / 2 \rfloor} \binom{n}{2 k + 1} P^{n - 2 k - 1} D^k</math>
 
  
gdzie <math>j = 2 k + 1</math> i&nbsp;sumowanie przebiega od <math>k = 0</math> do <math>k = \lfloor (n - 1) / 2 \rfloor</math>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C11*</span><br/>
 +
Jeżeli istnieje taka liczba całkowita <math>n</math> i&nbsp;rzeczywista <math>M</math>, że dla każdego <math>k > n</math> jest
  
 +
::<math>a_{k + 1} \leqslant a_k \qquad</math> oraz <math>\qquad a_k \geqslant M</math>
  
Zatem
+
to ciąg <math>(a_k)</math> jest zbieżny.<br/>
 
+
'''Inaczej mówiąc: ciąg malejący i&nbsp;ograniczony od dołu jest zbieżny.'''
::<math>2^{n - 1} \cdot {\small\frac{\alpha^n - \beta^n}{\sqrt{D}}} = 2^{n - 1} U_n = \sum_{k = 0}^{\lfloor (n - 1) / 2 \rfloor} \binom{n}{2 k + 1} P^{n - 2 k - 1} D^k</math>
 
 
 
Co należało pokazać.<br/>
 
&#9633;
 
{{\Spoiler}}
 
  
  
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L8</span><br/>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C12*</span><br/>
Korzystając z&nbsp;twierdzenia L7, możemy napisać proste funkcje do znajdowania postaci kolejnych wyrazów <math>U_n (P, Q)</math> i <math>V_n (P, Q)</math>
+
Jeżeli <math>\lim_{n \to \infty} a_n = a</math> oraz <math>\lim_{n \to \infty} b_n = b</math>, gdzie <math>a, b</math> są dowolnymi liczbami rzeczywistymi, to
  
<span style="font-size: 90%; color:black;">U(n) = 2^(1 - n)*'''sum'''(k=0, '''floor'''((n-1)/2), '''binomial'''(n, 2*k+1) * P^(n-2*k-1) * (P^2-4*Q)^k)</span>
+
# <math>\quad \lim_{n \to \infty} (a_n \pm b_n) = a \pm b</math>
 +
# <math>\quad \lim_{n \to \infty} (a_n \cdot b_n) = a \cdot b</math>
  
<span style="font-size: 90%; color:black;">V(n) = 2^(1 - n)*'''sum'''(k=0, '''floor'''(n/2), '''binomial'''(n, 2*k) * P^(n-2*k) * (P^2-4*Q)^k)</span>
+
Jeżeli dodatkowo dla każdego <math>n</math> jest <math>b_n \neq 0</math> i <math>b \neq 0</math>, to
  
 +
:&nbsp;&nbsp;3. <math>\quad \lim_{n \to \infty} \frac{a_n}{b_n} = \frac{a}{b}</math>
  
  
Często możemy spotkać założenie <math>P \geqslant 1</math>. Poniższe twierdzenie wyjaśnia, dlaczego tak jest.
 
  
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L9</span><br/>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C13</span><br/>
Jeżeli <math>(U_n)</math> i <math>(V_n)</math> są ciągami Lucasa, to
+
Jeżeli <math>\lim_{n \to \infty} a_n = 0</math>, zaś ciąg <math>(x_n)</math> jest ograniczony, czyli istnieje taka liczba <math>M > 0</math>, że dla każdej wartości <math>n</math> prawdziwa jest nierówność <math>| x_n | < M</math>, to
  
::<math>U_n (- P, Q) = (- 1)^{n - 1} U_n (P, Q)</math>
+
::<math>\lim_{n \to \infty} (x_n \cdot a_n) = 0</math>
 
 
::<math>V_n (- P, Q) = (- 1)^n V_n (P, Q)</math>
 
  
 
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
Niech
+
Wystarczy pokazać, że (zobacz twierdzenie C8 p.2)
  
::<math>\alpha = \frac{P + \sqrt{D}}{2} \qquad \qquad \;\; \beta = \frac{P - \sqrt{D}}{2}</math>
+
::<math>\lim_{n \to \infty} |x_n \cdot a_n| = 0</math>
  
::<math>a = \frac{- P + \sqrt{D}}{2} \qquad \qquad b = \frac{- P - \sqrt{D}}{2}</math>
+
Z założenia prawdziwe jest oszacowanie
  
Liczby <math>\alpha, \beta</math> oraz <math>a, b</math> są odpowiednio pierwiastkami równań
+
::<math>0 \leqslant |x_n \cdot a_n| \leqslant |a_n| \cdot M</math>
  
::<math>x^2 - P x + Q = 0</math>
+
Zatem z twierdzenia o trzech ciągach otrzymujemy natychmiast, że
  
::<math>x^2 + P x + Q = 0</math>
+
::<math>\lim_{n \to \infty} |x_n \cdot a_n| = 0</math>
  
Zatem definiują one ciągi Lucasa
+
Co kończy dowód.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
::<math>U_n (P, Q) = \frac{\alpha^n - \beta^n}{\alpha - \beta} \qquad \qquad \;\; V_n (P, Q) = \alpha^n + \beta^n</math>
 
  
::<math>U_n (- P, Q) = \frac{a^n - b^n}{a - b} \qquad \qquad V_n (- P, Q) = a^n + b^n</math>
 
  
Zauważmy, że
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C14</span><br/>
 +
Dla <math>a \geqslant 0</math> i <math>n \geqslant 1</math> prawdziwa jest nierówność
  
::<math>\alpha - \beta = a - b = \sqrt{D}</math>
+
::<math>(1 + a)^{1 / n} \leqslant 1 + \frac{a}{n}</math>
  
::<math>\frac{a}{\beta} = \frac{b}{\alpha} = - 1</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 
+
Wzór jest prawdziwy dla <math>a = 0</math>. Zakładając, że <math>a > 0</math> i&nbsp;korzystając ze wzoru dwumianowego, mamy dla <math>n \geqslant 1</math>
Łatwo znajdujemy
 
 
 
::<math>U_n (- P, Q) = \frac{a^n - b^n}{a - b} = \frac{(- \beta)^n - (- \alpha)^n}{\sqrt{D}} = (- 1)^n \cdot \frac{\beta^n - \alpha^n}{\alpha - \beta} = (- 1)^{n - 1} \cdot U_n (P, Q)</math>
 
  
::<math>V_n (- P, Q) = a^n + b^n = (- \beta)^n + (- \alpha)^n = (- 1)^n \cdot (\alpha^n + \beta^n) = (- 1)^n \cdot V_n (P, Q)</math>
+
::<math>\left( 1 + \frac{a}{n} \right)^n = \sum_{k=0}^{n}\left [\binom{n}{k} \cdot \left ( \frac{a}{n} \right )^k \right ] \geqslant</math>
 +
:::::<math>\;\; \geqslant \sum_{k=0}^{1}\left [\binom{n}{k} \cdot \left ( \frac{a}{n} \right )^k \right ] =</math>
 +
:::::<math>\;\; = 1 + n \cdot \frac{a}{n} =</math>
 +
:::::<math>\;\; = 1 + a</math>
  
 
Co należało pokazać.<br/>
 
Co należało pokazać.<br/>
Linia 216: Linia 205:
  
  
<span style="font-size: 110%; font-weight: bold;">Zadanie L10</span><br/>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C15</span><br/>
Pokazać, że jeżeli <math>P, Q \in \mathbb{Z} \setminus \{ 0 \}</math> i <math>D = P^2 - 4 Q \neq 0</math>, to
+
Jeżeli <math>A > 0</math>, to <math>\lim_{n \to \infty} \sqrt[n]{A} = 1</math>.
  
::<math>U_n (2 P, 4 Q) = 2^{n - 1} U_n (P, Q)</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 
+
Dla <math>A > 1</math> możemy napisać <math>A = 1 + a</math>, gdzie <math>a > 0</math>, wtedy z&nbsp;twierdzenia C14 otrzymujemy
::<math>V_n (2 P, 4 Q) = 2^n V_n (P, Q)</math>
 
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
+
::<math>1 < \sqrt[n]{A} = (1 + a)^{1 / n} \leqslant 1 + \frac{a}{n}</math>
Niech
 
  
::<math>\alpha = {\small\frac{P + \sqrt{D}}{2}} \qquad \qquad \;\; \beta = {\small\frac{P - \sqrt{D}}{2}}</math>
+
Z twierdzenia o&nbsp;trzech ciągach dostajemy natychmiast (dla <math>A > 1</math>)
  
::<math>a = P + \sqrt{D} \qquad \qquad \;\; b = P - \sqrt{D}</math>
+
::<math>\lim_{n \to \infty} \sqrt[n]{A} = 1</math>
  
Liczby <math>\alpha, \beta</math> oraz <math>a, b</math> są odpowiednio pierwiastkami równań
+
W przypadku gdy <math>0 < A < 1</math>, możemy napisać <math>A = \frac{1}{B}</math>, gdzie <math>B > 1</math>, wtedy ze względu na udowodniony wyżej rezultat <math>\lim_{n \to \infty} \sqrt[n]{B} = 1</math>
  
::<math>x^2 - P x + Q = 0</math>
+
::<math>\lim_{n \to \infty} \sqrt[n]{A} = \lim_{n \to \infty} \frac{1}{\sqrt[n]{B}} = \frac{1}{\underset{n \rightarrow \infty}{\lim} \sqrt[n]{B}} = 1</math>
  
::<math>x^2 - 2 P x + 4 Q = 0</math>
+
Jeżeli <math>A = 1</math>, to <math>\sqrt[n]{A} = 1</math> dla każdego <math>n \geqslant 1</math>. Co kończy dowód.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
Zatem definiują one ciągi Lucasa
 
  
::<math>U_n (P, Q) = {\small\frac{\alpha^n - \beta^n}{\alpha - \beta}} \qquad \qquad \;\;\; V_n (P, Q) = \alpha^n + \beta^n</math>
 
  
::<math>U_n (2 P, 4 Q) = {\small\frac{a^n - b^n}{a - b}} \qquad \qquad V_n (2 P, 4 Q) = a^n + b^n</math>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C16</span><br/>
 +
Jeżeli prawie wszystkie wyrazy ciągu ciągu <math>(a_n)</math> spełniają warunek <math>0 < m < a_n < M</math>, to <math>\lim_{n \to \infty} \sqrt[n]{a_n} = 1</math>
  
Zauważmy, że
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 
+
Z założenia dla prawie wszystkich wyrazów ciągu <math>(a_n)</math> jest
::<math>\alpha - \beta = \sqrt{D}</math>
 
 
 
::<math>a - b = 2 \sqrt{D}</math>
 
 
 
::<math>{\small\frac{a}{\alpha}} = {\small\frac{b}{\beta}} = 2</math>
 
  
Łatwo znajdujemy
+
::<math>0 < m \leqslant a_n \leqslant M</math>
  
::<math>U_n (2 P, 4 Q) = {\small\frac{a^n - b^n}{a - b}} = {\small\frac{(2 \alpha)^n - (2 \beta)^n}{2 \sqrt{D}}} = 2^{n - 1} \cdot {\small\frac{\alpha^n - \beta^n}{\alpha - \beta}} = 2^{n - 1} U_n (P, Q)</math>
+
Zatem dla prawie wszystkich wyrazów ciągu <math>a_n</math> mamy
  
::<math>V_n (2 P, 4 Q) = a^n + b^n = (2 \alpha)^n + (2 \beta)^n = 2^n (\alpha^n + \beta^n) = 2^n V_n (P, Q)</math>
+
::<math>\sqrt[n]{m} \leqslant \sqrt[n]{a_n} \leqslant \sqrt[n]{M}</math>
  
Co należało pokazać.<br/>
+
Z twierdzenia C15 wiemy, że <math>\lim_{n \to \infty} \sqrt[n]{m} = \lim_{n \to \infty} \sqrt[n]{M} = 1</math>, zatem na podstawie twierdzenia o&nbsp;trzech ciągach otrzymujemy natychmiast <math>\lim_{n \to \infty} \sqrt[n]{a_n} = 1</math><br/>
 
&#9633;
 
&#9633;
 
{{\Spoiler}}
 
{{\Spoiler}}
Linia 262: Linia 245:
  
  
<span style="font-size: 110%; font-weight: bold;">Zadanie L11</span><br/>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C17</span><br/>
Pokazać, że jeżeli <math>Q \in \mathbb{Z} \setminus \{ 0 \}</math> oraz <math>P = 4 Q - 1</math>, to
+
Następujące ciągi są silnie rosnące i&nbsp;zbieżne
  
::<math>U_{2 k} (P, P Q) = - (- P)^k U_{2 k} (1, Q)</math>
+
::{| class="wikitable plainlinks"  style="font-size: 100%; text-align: center; margin-right: auto;"
 +
|- style=height:4em
 +
| <math>\quad 1. \quad</math> || <math>\lim_{n \to \infty} \left( 1 + \frac{1}{n} \right)^n = e = 2.718281828 \ldots</math>
 +
|- style=height:4em
 +
| <math>\quad 2. \quad</math> || <math>\lim_{n \to \infty} \left( 1 - \frac{1}{n} \right)^n = \frac{1}{e} = 0.367879441 \ldots</math>
 +
|}
  
::<math>U_{2 k + 1} (P, P Q) = (- P)^k V_{2 k + 1} (1, Q)</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
'''Punkt 1'''<br/>
 +
W twierdzeniu A6 pokazaliśmy, że ciąg
  
::<math>V_{2 k} (P, P Q) = (- P)^k V_{2 k} (1, Q)</math>
+
::<math>a_n = \left( 1 + \frac{1}{n} \right)^n</math>
  
::<math>V_{2 k + 1} (P, P Q) = - (- P)^{k + 1} U_{2 k + 1} (1, Q)</math>
+
jest silnie rosnący i&nbsp;ograniczony od góry. Zatem z&nbsp;twierdzenia C10 wynika, że jest zbieżny. Liczbę będącą granicą tego ciągu oznaczamy literą <math>e</math>, jest ona podstawą logarytmu naturalnego.
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
+
'''Punkt 2'''<br/>
Niech
+
Pokażemy najpierw, że ciąg <math>\left( 1 - \frac{1}{n} \right)^n</math> jest silnie rosnący. Musimy pokazać, że prawdziwa jest nierówność
  
::<math>\alpha = {\small\frac{1 + \sqrt{- P}}{2}} \qquad \qquad \beta = {\small\frac{1 - \sqrt{- P}}{2}}</math>
+
::<math>\left( 1 - \frac{1}{n + 1} \right)^{n + 1} > \left( 1 - \frac{1}{n} \right)^n</math>
  
::<math>a = {\small\frac{P + \sqrt{- P}}{2}} \qquad \qquad b = {\small\frac{P - \sqrt{- P}}{2}}</math>
+
Łatwo sprawdzamy prawdziwość nierówności dla <math>n = 1</math>. Załóżmy teraz, że <math>n \geqslant 2</math>. Przekształcając,
  
Liczby <math>\alpha, \beta</math> oraz <math>a, b</math> są odpowiednio pierwiastkami równań
+
::<math>\left( \frac{n}{n + 1} \right)^{n + 1} > \left( \frac{n - 1}{n} \right)^n</math>
  
::<math>x^2 - x + {\small\frac{P + 1}{4}} = 0</math>
+
::<math>\frac{n}{n + 1} \cdot \left( \frac{n}{n + 1} \right)^n \cdot \left( \frac{n}{n - 1} \right)^n > 1</math>
  
::<math>x^2 - P x + {\small\frac{P (P + 1)}{4}} = 0</math>
+
::<math>\left( \frac{n^2}{n^2 - 1} \right)^n > \frac{n + 1}{n}</math>
  
Z założenia <math>P = 4 Q - 1</math>, zatem
+
otrzymujemy nierówność równoważną,
  
::<math>x^2 - x + Q = 0</math>
+
::<math>\left( 1 + \frac{1}{n^2 - 1} \right)^n > 1 + \frac{1}{n}</math>
  
::<math>x^2 - P x + P Q = 0</math>
+
którą już łatwo udowodnić, bo
  
Czyli definiują one ciągi Lucasa
+
::<math>\left( 1 + \frac{1}{n^2 - 1} \right)^n > \left( 1 + \frac{1}{n^2} \right)^n = \sum_{k = 0}^{n} \binom{n}{k} \cdot \left( \frac{1}{n^2} \right)^k > \sum_{k = 0}^{1} \binom{n}{k} \cdot \frac{1}{n^{2k}} = 1 + \frac{1}{n}</math>
  
::<math>U_n (1, Q) = {\small\frac{\alpha^n - \beta^n}{\alpha - \beta}} \qquad \qquad \:\:\: V_n (1, Q) = \alpha^n + \beta^n</math>
+
Ponieważ dla każdego <math>n \geqslant 1</math> jest <math>\left( 1 - \frac{1}{n} \right)^n \leqslant 1</math> (bo iloczyn liczb mniejszych od <math>1</math> nie może być liczbą większą do jedności), to z&nbsp;twierdzenia C10 wynika, że ciąg ten jest zbieżny. Zatem możemy napisać
  
::<math>U_n (P, P Q) = {\small\frac{a^n - b^n}{a - b}} \qquad \qquad V_n (P, P Q) = a^n + b^n</math>
+
::<math>\underset{n \rightarrow \infty}{\lim} \left( 1 - \frac{1}{n} \right)^n = g</math>
  
Zauważmy, że
+
Rozważmy teraz iloczyn wypisanych w&nbsp;twierdzeniu ciągów
  
::<math>\alpha - \beta = a - b = \sqrt{- P}</math>
+
::<math>\left( 1 + \frac{1}{n} \right)^n \cdot \left( 1 - \frac{1}{n} \right)^n = \left( 1 - \frac{1}{n^2} \right)^n = \left[ \left( 1 - \frac{1}{n^2} \right)^{n^2} \right]^{1 / n}</math>
  
::<math>{\small\frac{a}{\beta}} = {\small\frac{P + \sqrt{- P}}{1 - \sqrt{- P}}} = \sqrt{- P}</math>
+
Łatwo widzimy, że ciąg <math>\left( 1 - \frac{1}{n^2} \right)^{n^2}</math> jest podciągiem ciągu <math>\left( 1 - \frac{1}{n} \right)^n</math>, zatem jest ograniczony i&nbsp;dla <math>n \geqslant 2</math> spełniony jest układ nierówności
  
::<math>{\small\frac{b}{\alpha}} = {\small\frac{P - \sqrt{- P}}{1 + \sqrt{- P}}} = - \sqrt{- P}</math>
+
::<math>0 < \left( \frac{3}{4} \right)^4 \leqslant \left( 1 - \frac{1}{n^2} \right)^{n^2} \leqslant 1</math>
  
 +
Z twierdzenia C16 dostajemy
  
Łatwo znajdujemy
+
::<math>\lim_{n \to \infty} \left[ \left( 1 - \frac{1}{n^2} \right)^{n^2} \right]^{1 / n} = 1</math>
  
::<math>U_{2 k} (P, P Q) = \frac{a^{2 k} - b^{2 k}}{a - b} = \frac{\left( \beta \sqrt{- P} \right)^{2 k} - \left( - \alpha \sqrt{- P} \right)^{2 k}}{\sqrt{- P}} = \frac{(- P)^k (\beta^{2 k} - \alpha^{2 k})}{\alpha - \beta} = - (- P)^k U_{2 k} (1, Q)</math>
+
Z twierdzenia C12 p. 2 wynika natychmiast, że
  
 +
::<math>e \cdot g = \lim_{n \to \infty} \left[ \left( 1 + \frac{1}{n} \right)^n \cdot \left( 1 - \frac{1}{n} \right)^n \right] = \lim_{n \to \infty} \left[ \left( 1 - \frac{1}{n^2} \right)^{n^2} \right]^{1 / n} = 1</math>
  
::<math>U_{2 k + 1} (P, P Q) = \frac{a^{2 k + 1} - b^{2 k + 1}}{a - b} = \frac{\left( \beta \sqrt{- P} \right)^{2 k + 1} - \left( - \alpha \sqrt{- P} \right)^{2 k + 1}}{\sqrt{- P}} = (- P)^k (\beta^{2 k + 1} + \alpha^{2 k + 1}) = (- P)^k V_{2 k + 1} (1, Q)</math>
+
Zatem <math>g = \frac{1}{e}</math>.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
  
::<math>V_{2 k} (P, P Q) = a^{2 k} + b^{2 k} = \left( \beta \sqrt{- P} \right)^{2 k} + \left( - \alpha \sqrt{- P} \right)^{2 k} = (- P)^k (\alpha^{2 k} + \beta^{2 k}) = (- P)^k V_{2 k} (1, Q)</math>
 
  
 +
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C18</span><br/>
 +
Dla <math>n \geqslant 2</math> prawdziwe są następujące nierówności
  
::<math>V_{2 k + 1} (P, P Q) = a^{2 k + 1} + b^{2 k + 1} = \left( \beta \sqrt{- P} \right)^{2 k + 1} + \left( - \alpha \sqrt{- P} \right)^{2 k + 1} = (- P)^{k + 1} \cdot \frac{\beta^{2 k + 1} - \alpha^{2 k + 1}}{\sqrt{- P}} = - (- P)^{k + 1} U_{2 k + 1} (1, Q)</math>
+
::{| class="wikitable plainlinks"  style="font-size: 100%; text-align: center; margin-right: auto;"
 +
|- style=height:4em
 +
| <math>\quad 1. \quad</math> || <math> \frac{1}{n + 1} < \log \left( 1 + \frac{1}{n} \right) < \frac{1}{n}</math>
 +
|- style=height:4em
 +
| <math>\quad 2. \quad</math> || <math>- \frac{1}{n - 1} < \log \left( 1 - \frac{1}{n} \right) < - \frac{1}{n}</math>
 +
|}
  
Co należało pokazać.<br/>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
&#9633;
+
Ponieważ ciąg <math>\left( 1 + \frac{1}{n} \right)^n</math> jest silnie rosnący, to
{{\Spoiler}}
 
  
 +
::<math>\left( 1 + \frac{1}{n} \right)^n < e</math>
  
 +
Logarytmując powyższą nierówność, mamy
  
<span style="font-size: 110%; font-weight: bold;">Zadanie L12</span><br/>
+
::<math>n \cdot \log \left( 1 + \frac{1}{n} \right) < 1</math>
Pokazać, że jeżeli <math>Q \in \mathbb{Z} \setminus \{ 0 \}</math> oraz <math>P = 4 Q + 1</math>, to
 
  
::<math>U_{2 k} (P, P Q) = P^k U_{2 k} (1, - Q)</math>
+
Stąd wynika natychmiast, że
  
::<math>U_{2 k + 1} (P, P Q) = P^k V_{2 k + 1} (1, - Q)</math>
+
::<math>\log \left( 1 + \frac{1}{n} \right) < \frac{1}{n}</math>
  
::<math>V_{2 k} (P, P Q) = P^k V_{2 k} (1, - Q)</math>
 
  
::<math>V_{2 k + 1} (P, P Q) = P^{k + 1} U_{2 k + 1} (1, - Q)</math>
+
Ponieważ ciąg <math>\left( 1 - \frac{1}{n} \right)^n</math> również jest silnie rosnący, to postępując analogicznie, dostajemy
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
+
::<math>\left( 1 - \frac{1}{n} \right)^n < \frac{1}{e}</math>
Niech
 
  
::<math>\alpha = {\small\frac{1 + \sqrt{P}}{2}} \qquad \qquad \beta = {\small\frac{1 - \sqrt{P}}{2}}</math>
+
::<math>n \cdot \log \left( 1 - \frac{1}{n} \right) < - 1</math>
  
::<math>a = {\small\frac{P + \sqrt{P}}{2}} \qquad \qquad b = {\small\frac{P - \sqrt{P}}{2}}</math>
+
::<math>\log \left( 1 - \frac{1}{n} \right) < - \frac{1}{n}</math>
  
Liczby <math>\alpha, \beta</math> oraz <math>a, b</math> są odpowiednio pierwiastkami równań
 
  
::<math>x^2 - x - {\small\frac{P - 1}{4}} = 0</math>
+
Przekształcając otrzymane wzory, otrzymujemy
  
::<math>x^2 - P x + {\small\frac{P (P - 1)}{4}} = 0</math>
+
::<math>- \log \left( 1 + \frac{1}{n} \right) = - \log \left( \frac{n + 1}{n} \right) = \log \left( \frac{n}{n + 1} \right) = \log \left( 1 - \frac{1}{n + 1} \right) < - \frac{1}{n + 1}</math>
  
Z założenia <math>P = 4 Q + 1</math>, zatem
+
oraz
  
::<math>x^2 - x - Q = 0</math>
+
::<math>- \log \left( 1 - \frac{1}{n} \right) = - \log \left( \frac{n - 1}{n} \right) = \log \left( \frac{n}{n - 1} \right) = \log \left( 1 + \frac{1}{n - 1} \right) < \frac{1}{n - 1}</math><br/>
 +
&#9633;
 +
{{\Spoiler}}
  
::<math>x^2 - P x + P Q = 0</math>
 
  
Czyli definiują one ciągi Lucasa
 
  
::<math>U_n (1, - Q) = {\small\frac{\alpha^n - \beta^n}{\alpha - \beta}} \qquad \qquad V_n (1, - Q) = \alpha^n + \beta^n</math>
 
  
::<math>U_n (P, P Q) = {\small\frac{a^n - b^n}{a - b}} \qquad \qquad V_n (P, P Q) = a^n + b^n</math>
 
  
Zauważmy, że
+
== Liczby pierwsze w&nbsp;ciągach arytmetycznych ==
  
::<math>\alpha - \beta = a - b = \sqrt{P}</math>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C19</span><br/>
 +
Każda liczba naturalna <math>n \geqslant 2</math> jest liczbą pierwszą lub iloczynem liczb pierwszych.
  
::<math>{\small\frac{a}{\alpha}} = {\small\frac{P + \sqrt{P}}{1 + \sqrt{P}}} = \sqrt{P}</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
<span style="border-bottom-style: double;">Pierwszy sposób</span><br/><br/>
 +
Przypuśćmy, że istnieją liczby naturalne większe od <math>1</math>, które nie są liczbami pierwszymi ani nie są iloczynami liczb pierwszych. Niech <math>m</math> oznacza najmniejszą<ref name="WellOrdering"/> z&nbsp;takich liczb. Z&nbsp;założenia <math>m</math> nie jest liczbą pierwszą, zatem <math>m</math> może być zapisana w&nbsp;postaci <math>m = a \cdot b</math>, gdzie liczby <math>a, b</math> są liczbami naturalnymi mniejszymi od <math>m</math>.
  
::<math>{\small\frac{b}{\beta}} = {\small\frac{P - \sqrt{P}}{1 - \sqrt{P}}} = - \sqrt{P}</math>
+
Ponieważ <math>m</math> jest najmniejszą liczbą naturalną, która nie jest liczbą pierwszą ani nie jest iloczynem liczb pierwszych, to liczby <math>a</math> i <math>b</math> muszą być liczbami złożonymi, ale jako mniejsze od <math>m</math> są one iloczynami liczb pierwszych, zatem i&nbsp;liczba <math>m</math> musi być iloczynem liczb pierwszych.
  
 +
Uzyskana sprzeczność dowodzi, że nasze przypuszczenie jest fałszywe.
  
Łatwo znajdujemy
 
  
::<math>U_{2 k} (P, P Q) = \frac{a^{2 k} - b^{2 k}}{a - b} = \frac{\left( \alpha \sqrt{P} \right)^{2 k} - \left( - \beta \sqrt{P} \right)^{2 k}}{\sqrt{P}} = \frac{P^k (\alpha^{2 k} - \beta^{2 k})}{\alpha - \beta} = P^k U_{2 k} (1, - Q)</math>
+
<span style="border-bottom-style: double;">Drugi sposób</span><br/><br/>
 +
Indukcja matematyczna. Twierdzenie jest oczywiście prawdziwe dla <math>n = 2</math>.
 +
Zakładając, że twierdzenie jest prawdziwe dla '''wszystkich''' liczb naturalnych <math>k \in [2, n]</math>, dla liczby <math>n + 1</math> mamy dwie możliwości
  
 +
* <math>n + 1</math> jest liczbą pierwszą (wtedy twierdzenie jest prawdziwe w&nbsp;sposób oczywisty)
 +
* <math>n + 1</math> jest liczbą złożoną wtedy, <math>n + 1 = a b</math>, gdzie <math>1 < a, b < n + 1</math>; zatem na podstawie założenia indukcyjnego liczby <math>a</math> i <math>b</math> są liczbami pierwszymi lub iloczynami liczb pierwszych, czyli <math>n + 1 = a b</math> jest iloczynem liczb pierwszych.
  
::<math>U_{2 k + 1} (P, P Q) = \frac{a^{2 k + 1} - b^{2 k + 1}}{a - b} = \frac{\left( \alpha \sqrt{P} \right)^{2 k + 1} - \left( - \beta \sqrt{P} \right)^{2 k + 1}}{\sqrt{P}} = P^k (\alpha^{2 k + 1} + \beta^{2 k + 1}) = P^k V_{2 k + 1} (1, - Q)</math>
+
Co należało pokazać.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
  
::<math>V_{2 k} (P, P Q) = a^{2 k} + b^{2 k} = \left( \alpha \sqrt{P} \right)^{2 k} + \left( - \beta \sqrt{P} \right)^{2 k} = P^k (\alpha^{2 k} + \beta^{2 k}) = P^k V_{2 k} (1, - Q)</math>
 
  
 +
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C20 (Euklides, IV w. p.n.e.)</span><br/>
 +
Istnieje nieskończenie wiele liczb pierwszych.
  
::<math>V_{2 k + 1} (P, P Q) = a^{2 k + 1} + b^{2 k + 1} = \left( \alpha \sqrt{P} \right)^{2 k + 1} + \left( - \beta \sqrt{P} \right)^{2 k + 1} = P^{k + 1} \cdot \frac{\alpha^{2 k + 1} - \beta^{2 k + 1}}{\sqrt{P}} = P^{k + 1} U_{2 k + 1} (1, - Q)</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 
+
Przypuśćmy, że istnieje jedynie skończona ilość liczb pierwszych <math>p_1, p_2, \ldots, p_n</math> . Wtedy liczba <math>a = p_1 \cdot p_2 \cdot \ldots \cdot p_n + 1</math> jest większa od jedności i&nbsp;z&nbsp;twierdzenia C19 wynika, że posiada dzielnik będący liczbą pierwszą, ale jak łatwo zauważyć żadna z&nbsp;liczb pierwszych <math>p_1, p_2, \ldots, p_n</math> nie jest dzielnikiem liczby <math>a</math>. Zatem istnieje liczba pierwsza <math>p</math> będąca dzielnikiem pierwszym liczby <math>a</math> i&nbsp;różna od każdej z&nbsp;liczb <math>p_1, p_2, \ldots, p_n</math>. Co kończy dowód.<br/>
Co należało pokazać.<br/>
 
 
&#9633;
 
&#9633;
 
{{\Spoiler}}
 
{{\Spoiler}}
Linia 390: Linia 394:
  
  
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L13</span><br/>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C21</span><br/>
Dla wyrazów ciągów Lucasa prawdziwe są wzory
+
Jeżeli liczba naturalna <math>n</math> jest postaci <math>4 k + 3</math><ref name="LiczbaJestPostaci"/>, to ma dzielnik postaci <math>4 k + 3</math> będący liczbą pierwszą.
 
 
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 100%; text-align: left;"
 
|-
 
| <math>1.</math> || <math>U_{m + n} = U_m U_{n + 1} - Q U_{m - 1} U_n</math> ||
 
|-
 
| <math>2.</math> || <math>V_{m + n} = V_m V_n - Q^n V_{m - n}</math> || <math>m \geqslant n</math>
 
|-
 
| <math>3.</math> || <math>U_{m + n} = U_m V_n - Q^n U_{m - n}</math> || <math>m \geqslant n</math>
 
|-
 
| <math>4.</math> || <math>V_{m + n} = D U_m U_n + Q^n V_{m - n}</math> || <math>m \geqslant n</math>
 
|-
 
| <math>5.</math> || <math>U_m V_n - V_m U_n = 2 Q^n U_{m - n}</math> || <math>m \geqslant n</math>
 
|-
 
| <math>6.</math> || <math>U^2_n = U_{n - 1} U_{n + 1} + Q^{n - 1}</math> ||
 
|-
 
| <math>7.</math> || <math>V^2_n = V_{n - 1} V_{n + 1} - D Q^{n - 1}</math> ||
 
|}
 
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 100%; text-align: left;"
 
|-
 
| <math>\;\; 8.</math> || <math>2 U_{m + n} = U_m V_n + V_m U_n</math> ||
 
|-
 
| <math>\;\; 9.</math> || <math>2 V_{m + n} = V_m V_n + D U_m U_n</math> ||
 
|-
 
| <math>10.</math> || <math>V_m V_n - D U_m U_n = 2 Q^n V_{m - n}</math> || <math>m \geqslant n</math>
 
|-
 
| <math>11.</math> || <math>U_{2 n} = U_n V_n</math> ||
 
|-
 
| <math>12.</math> || <math>V_{2 n} = V^2_n - 2 Q^n</math> ||
 
|-
 
| <math>13.</math> || <math>V_{2 n} = D U^2_n + 2 Q^n</math> ||
 
|-
 
| <math>14.</math> || <math>V^2_n - D U^2_n = 4 Q^n</math> ||
 
|-
 
| <math>15.</math> || <math>D U_n = 2 V_{n + 1} - P V_n</math> ||
 
|-
 
| <math>16.</math> || <math>V_n = 2 U_{n + 1} - P U_n</math> ||
 
|-
 
| <math>17.</math> || <math>D U_n = V_{n + 1} - Q V_{n - 1}</math> || <math>n \geqslant 1</math>
 
|-
 
| <math>18.</math> || <math>V_n = U_{n + 1} - Q U_{n - 1}</math> || <math>n \geqslant 1</math>
 
|}
 
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 100%; text-align: left;"
 
|-
 
| <math>19.</math> || <math>U_{2 n} = 2 U_n U_{n + 1} - P U^2_n</math>
 
|-
 
| <math>20.</math> || <math>U_{2 n + 1} = U^2_{n + 1} - Q U^2_n</math>
 
|-
 
| <math>21.</math> || <math>U_{2 n + 2} = P U^2_{n + 1} - 2 Q U_n U_{n + 1}</math>
 
|}
 
  
 
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
'''Wzory 1. - 7. najłatwiej udowodnić korzystając z&nbsp;definicji L1.'''
+
Jeżeli <math>n</math> jest liczbą pierwszą, to twierdzenie jest dowiedzione. Zbadajmy zatem sytuację gdy <math>n</math> jest liczbą złożoną. Z&nbsp;założenia <math>n</math> jest liczbą nieparzystą, zatem możliwe są trzy typy iloczynów
  
Wzór 1.
+
::<math>(4 a + 1) (4 b + 1) = 16 a b + 4 a + 4 b + 1 = 4 (4 a b + a + b) + 1</math>
  
::<math>U_{m + n} = {\small\frac{\alpha^{m + n} - \beta^{m + n}}{\alpha - \beta}}</math>
+
::<math>(4 a + 1) (4 b + 3) = 16 a b + 12 a + 4 b + 3 = 4 (4 a b + 3 a + b) + 3</math>
  
:::<math>\quad \: = {\small\frac{\alpha^m - \beta^m}{\alpha - \beta}} \cdot {\small\frac{\alpha^{n + 1} - \beta^{n + 1}}{\alpha - \beta}} - \alpha \beta \cdot {\small\frac{\alpha^{m - 1} - \beta^{m - 1}}{\alpha - \beta}} \cdot {\small\frac{\alpha^n - \beta^n}{\alpha - \beta}}</math>
+
::<math>(4 a + 3) (4 b + 3) = 16 a b + 12 a + 12 b + 9 = 4 (4 a b + 3 a + 3 b + 2) + 1</math>
  
:::<math>\quad \: = U_m U_{n + 1} - Q U_{m - 1} U_n</math>
+
Widzimy, że liczba złożona postaci <math>4 k + 3</math> jest iloczynem liczb postaci <math>4 k + 1</math> i <math>4 k + 3</math>. Wynika stąd natychmiast, że liczba złożona postaci <math>4 k + 3</math> posiada dzielnik postaci <math>4 k + 3</math>. Niech <math>q</math> oznacza najmniejszy dzielnik liczby <math>n</math> postaci <math>4 k + 3</math>. Pokażemy, że <math>q</math> jest liczbą pierwszą. Istotnie, gdyby <math>q</math> była liczbą złożoną, to miałaby dzielnik <math>d</math> postaci <math>4 k + 3</math> i&nbsp;byłoby <math>d < q</math>, wbrew założeniu, że <math>q</math> jest najmniejszym dzielnikiem liczby <math>n</math> postaci <math>4 k + 3</math>. Co kończy dowód.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
  
Wzór 2.
 
  
::<math>V_{m + n} = \alpha^{m + n} + \beta^{m + n}</math>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C22</span><br/>
 +
Istnieje nieskończenie wiele liczb pierwszych postaci <math>4 k + 3</math>.
  
:::<math>\quad \;\! = (\alpha^m + \beta^m) (\alpha^n + \beta^n) - \alpha^n \beta^n \cdot (\alpha^{m - n} + \beta^{m - n})</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
Przypuśćmy, że istnieje tylko skończona ilość liczb pierwszych postaci <math>4 k + 3</math>. Niech będą to liczby <math>p_1, \ldots, p_s</math>. Liczba
  
:::<math>\quad \;\! = V_m V_n - Q^n V_{m - n}</math>
+
::<math>M = 4 p_1 \cdot \ldots \cdot p_s - 1 = 4 (p_1 \cdot \ldots \cdot p_s - 1) + 3</math>
  
 +
jest postaci <math>4 k + 3</math> i&nbsp;jak wiemy z&nbsp;twierdzenia C21, ma dzielnik pierwszy <math>q</math> postaci <math>4 k + 3</math>. Ale jak łatwo zauważyć, żadna z&nbsp;liczb <math>p_1, \ldots, p_s</math> nie dzieli liczby <math>M</math>. Zatem istnieje liczba pierwsza <math>q</math> postaci <math>4 k + 3</math> różna od każdej z&nbsp;liczb <math>p_1, p_2, \ldots, p_s</math>. Otrzymana sprzeczność kończy dowód.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
Wzór 3.
 
  
::<math>U_{m + n} = {\small\frac{\alpha^{m + n} - \beta^{m + n}}{\alpha - \beta}}</math>
 
  
:::<math>\quad \: = {\small\frac{(\alpha^m - \beta^m) (\alpha^n + \beta^n)}{\alpha - \beta}} - {\small\frac{\alpha^n \beta^n \cdot (\alpha^{m - n} - \beta^{m - n})}{\alpha - \beta}}</math>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C23</span><br/>
 +
Jeżeli liczba naturalna <math>n</math> jest postaci <math>6 k + 5</math>, to ma dzielnik postaci <math>6 k + 5</math> będący liczbą pierwszą.
  
:::<math>\quad \: = U_m V_n - Q^n U_{m - n}</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
Jeżeli <math>n</math> jest liczbą pierwszą, to twierdzenie jest dowiedzione. Zbadajmy sytuację gdy <math>n</math> jest liczbą złożoną. Z&nbsp;twierdzenia C19 wiemy, że w&nbsp;tym przypadku liczba <math>n</math> będzie iloczynem liczb pierwszych. Zauważmy, że nieparzyste liczby pierwsze mogą być jedynie postaci <math>6 k + 1</math> lub <math>6 k + 5</math> (liczba <math>6 k + 3</math> jest liczbą złożoną). Ponieważ iloczyn liczb postaci <math>6 k + 1</math>
  
 +
::<math>(6 a + 1) (6 b + 1) = 36 a b + 6 a + 6 b + 1 = 6 (6 a b + a + b) + 1</math>
  
Wzór 4.
+
jest liczbą postaci <math>6 k + 1</math>, to w&nbsp;rozkładzie liczby <math>n</math> na czynniki pierwsze musi pojawić się przynajmniej jeden czynnik postaci <math>6 k + 5</math>. Co kończy dowód.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
::<math>V_{m + n} = \alpha^{m + n} + \beta^{m + n}</math>
 
  
:::<math>\quad \;\! = (\alpha - \beta)^2 \cdot {\small\frac{\alpha^m - \beta^m}{\alpha - \beta}} \cdot {\small\frac{\alpha^n - \beta^n}{\alpha - \beta}} + \alpha^n \beta^n \cdot (\alpha^{m - n} + \beta^{m - n})</math>
 
  
:::<math>\quad \;\! = D U_m U_n + Q^n V_{m - n}</math>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C24</span><br/>
 +
Istnieje nieskończenie wiele liczb pierwszych postaci <math>6 k + 5</math>.
  
 +
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
Przypuśćmy, że istnieje tylko skończona ilość liczb pierwszych postaci <math>6 k + 5</math>. Niech będą to liczby <math>p_1, \ldots, p_s</math>. Liczba
  
Wzór 5.
+
::<math>M = 6 p_1 \cdot \ldots \cdot p_s - 1 = 6 (p_1 \cdot \ldots \cdot p_s - 1) + 5</math>
  
::<math>U_m V_n - V_m U_n = {\small\frac{\alpha^m - \beta^m}{\alpha - \beta}} \cdot (\alpha^n + \beta^n) - (\alpha^m + \beta^m) \cdot {\small\frac{\alpha^n - \beta^n}{\alpha - \beta}}</math>
+
jest postaci <math>6 k + 5</math> i&nbsp;jak wiemy z&nbsp;twierdzenia C23 ma dzielnik pierwszy <math>q</math> postaci <math>6 k + 5</math>. Ale jak łatwo zauważyć żadna z&nbsp;liczb <math>p_1, \ldots, p_s</math> nie dzieli liczby <math>M</math>. Zatem istnieje liczba pierwsza <math>q</math> postaci <math>6 k + 5</math> różna od każdej z&nbsp;liczb <math>p_1, p_2, \ldots, p_s</math>. Otrzymana sprzeczność kończy dowód.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
::::::<math>\;\;\: = 2 \cdot \alpha^n \beta^n \cdot {\small\frac{\alpha^{m - n} - \beta^{m - n}}{\alpha - \beta}}</math>
 
  
::::::<math>\;\;\: = 2 Q^n U_{m - n}</math>
 
  
 +
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C25</span><br/>
 +
Istnieje nieskończenie wiele liczb pierwszych postaci <math>3 k + 2</math>.
  
Wzór 6.
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
Jeżeli <math>k = 2 j</math> jest liczbą parzystą, to otrzymujemy ciąg liczb parzystych
  
::<math>U^2_n = \left( {\small\frac{\alpha^n - \beta^n}{\alpha - \beta}} \right)^2</math>
+
::<math>3 k + 2 = 6 j + 2</math>
  
:::<math>\;\! = {\small\frac{\alpha^{n - 1} - \beta^{n - 1}}{\alpha - \beta}} \cdot {\small\frac{\alpha^{n + 1} - \beta^{n + 1}}{\alpha - \beta}} + \alpha^{n - 1} \beta^{n - 1}</math>
+
w którym jedynie liczba <math>2</math> jest liczbą pierwszą (dla <math>j = 0</math>).
  
:::<math>\;\! = U_{n - 1} U_{n + 1} + Q^{n - 1}</math>
+
Jeżeli <math>k = 2 j + 1</math> jest liczbą nieparzystą, to otrzymujemy ciąg liczb nieparzystych
  
 +
::<math>3 k + 2 = 3 (2 j + 1) + 2 = 6 j + 5</math>
  
Wzór 7.
+
o którym wiemy, że zawiera nieskończenie wiele liczb pierwszych (zobacz twierdzenie C24). Zatem w&nbsp;ciągu arytmetycznym postaci <math>3 k + 2</math> występuje nieskończenie wiele liczb pierwszych.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
::<math>V^2_n = (\alpha^n + \beta^n)^2</math>
 
  
:::<math>\;\! = (\alpha^{n - 1} + \beta^{n - 1}) (\alpha^{n + 1} + \beta^{n + 1}) - (\alpha - \beta)^2 \cdot \alpha^{n - 1} \beta^{n - 1}</math>
 
  
:::<math>\;\! = V_{n - 1} V_{n + 1} - D Q^{n - 1}</math>
+
<span style="font-size: 110%; font-weight: bold;">Uwaga C26</span><br/>
 +
Zauważmy, że liczby postaci <math>2 k + 1</math> to wszystkie liczby nieparzyste dodatnie. Ponieważ wszystkie liczby pierwsze (poza liczbą <math>2</math>) są liczbami nieparzystymi, to wśród liczb postaci <math>2 k + 1</math> występuje nieskończenie wiele liczb pierwszych.
  
 +
Wszystkie omówione wyżej przypadki ciągów arytmetycznych: <math>2 k + 1</math>, <math>3 k + 2</math>, <math>4 k + 3</math> i <math>6 k + 5</math>, w&nbsp;których występuje nieskończona ilość liczb pierwszych są szczególnymi przypadkami udowodnionego w 1837 roku twierdzenia<br/>
  
'''Wzory 8. - 18. można łatwo udowodnić, korzystając ze wzorów 1. - 7.'''
 
  
Wzór 8. Policzyć sumę wzoru 3. pomnożonego przez <math>2</math> i&nbsp;wzoru 5.
 
  
Wzór 9. Policzyć sumę wzorów 2. i 4.
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C27* (Peter Gustav Lejeune Dirichlet, 1837)</span><br/>
 +
Niech <math>a \in \mathbb{Z}_+</math> i <math>b \in \mathbb{Z}</math>. Jeżeli liczby <math>a</math> i <math>b</math> są względnie pierwsze, to w&nbsp;ciągu arytmetycznym <math>a k + b</math> występuje nieskończenie wiele liczb pierwszych.
  
Wzór 10. Połączyć wzory 2. i 4.
 
  
Wzór 11. We wzorze 3. położyć <math>m = n</math>.
 
  
Wzór 12. We wzorze 2. położyć <math>m = n</math>.
+
<span style="font-size: 110%; font-weight: bold;">Uwaga C28</span><br/>
 +
Dowód twierdzenia Dirichleta jest bardzo trudny. Natomiast bardzo łatwo można pokazać, że dowolny ciąg arytmetyczny <math>a k + b</math> zawiera nieskończenie wiele liczb złożonych. Istotnie, jeżeli liczby <math>a, b</math> nie są względnie pierwsze, to wszystkie wyrazy ciągu są liczbami złożonymi. Jeżeli <math>a, b</math> są względnie pierwsze i <math>b > 1 ,</math> to wystarczy przyjąć <math>k = b t</math>. Jeżeli są względnie pierwsze i <math>b = 1</math>, to wystarczy przyjąć <math>k = a t^2 + 2 t</math>, wtedy
  
Wzór 13. We wzorze 4. położyć <math>m = n</math>.
+
::<math>a k + 1 = a^2 t^2 + 2 a t + 1 = (a t + 1)^2</math>
  
Wzór 14. We wzorze 10. położyć <math>m = n</math> lub połączyć wzory 12. i 13.
 
  
Wzór 15. We wzorze 9. położyć <math>m = 1</math>.
 
  
Wzór 16. We wzorze 8. położyć <math>m = 1</math>.
+
<span style="font-size: 110%; font-weight: bold;">Uwaga C29</span><br/>
 +
Wiemy już, że w przypadku gdy liczby <math>a</math> i <math>b</math> są względnie pierwsze, to w ciągu arytmetycznym <math>a k + b</math> występuje nieskończenie wiele liczb pierwszych. Pojawia się pytanie o to, czy możliwe jest oszacowanie najmniejszej liczby pierwszej <math>p</math> w takim ciągu. Jakkolwiek przypuszczamy, że prawdziwe jest oszacowanie <math>p < a^2</math>, to stan naszej obecnej wiedzy ujmuje twierdzenie Linnika<ref name="Linnik1"/><ref name="Linnik2"/><ref name="Linnik3"/><ref name="Linnik4"/>, które podajemy niżej. Trzeba było ponad pół wieku wysiłku wielu matematyków, aby pokazać, że w twierdzeniu Linnika możemy przyjąć <math>L = 5</math><ref name="Xylouris1"/>.
  
Wzór 17. We wzorze 15. położyć <math>V_{n + 1} = P V_n - Q V_{n - 1}</math>.
 
  
Wzór 18. We wzorze 16. położyć <math>U_{n + 1} = P U_n - Q U_{n - 1}</math>.
 
  
 +
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C30* (Jurij Linnik, 1944)</span><br/> Niech <math>a, b \in \mathbb{Z}_+</math> i <math>p_{\min} (a, b)</math> oznacza najmniejszą liczbę pierwszą w ciągu arytmetycznym <math>a k + b</math>, gdzie <math>k \in \mathbb{Z}_+</math>. Jeżeli <math>\gcd (a, b) = 1</math> i <math>b \in [1, a - 1]</math>, to istnieją takie stałe <math>L > 0</math> i <math>a_0 \geqslant 2</math>, że dla wszystkich <math>a > a_0</math> prawdziwe jest oszacowanie
  
'''Wzory 19. - 21. to wzory, które wykorzystamy w&nbsp;przyszłości do szybkiego obliczania wartości wyrazów <math>U_n</math> i <math>V_n</math> modulo.'''
+
::<math>p_{\min} (a, b) < a^L</math>
  
Wzór 19. Wystarczy połączyć wzory 11. oraz 16.
 
  
Wzór 20. Wystarczy we wzorze 1. położyć <math>m = n + 1</math>.
 
  
Wzór 21. Kładąc we wzorze 19. <math>n \rightarrow n + 1</math>, otrzymujemy
+
<span style="font-size: 110%; font-weight: bold;">Zadanie C31</span><br/>
 +
Pokazać, że istnieje nieskończenie wiele liczb pierwszych zakończonych cyframi 99, przykładowo 199, 499, 599, 1399, 1499, ...
  
::<math>U_{2 n + 2} = 2 U_{n + 1} U_{n + 2} - P U^2_{n + 1} \qquad (*)</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
 +
Wszystkie liczby naturalne zakończone cyframi <math>99</math> możemy zapisać w&nbsp;postaci <math>a_n = 100 k + 99</math>, gdzie <math>k \in \mathbb{N}</math>. Ponieważ ciąg <math>(a_n)</math> jest ciągiem arytmetycznym, a&nbsp;liczby <math>99</math> i <math>100</math> są względnie pierwsze, to na podstawie twierdzenia Dirichleta stwierdzamy, że istnieje nieskończenie wiele liczb pierwszych zakończonych cyframi <math>99</math>.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
Kładąc we wzorze 1. <math>m = n + 2</math>, mamy
 
  
::<math>U_{2 n + 2} = U_{n + 2} U_{n + 1} - Q U_{n + 1} U_n</math>
 
  
Czyli
+
<span style="font-size: 110%; font-weight: bold;">Definicja C32</span><br/>
 +
Niech <math>a \geqslant 2</math> będzie liczbą całkowitą. Wartość funkcji <math>\pi(n; a, b)</math> jest równa ilości liczb pierwszych nie większych od <math>n</math>, które przy dzieleniu przez <math>a</math> dają resztę <math>b</math>.
  
::<math>2 U_{2 n + 2} = 2 U_{n + 1} U_{n + 2} - 2 Q U_n U_{n + 1}</math>
 
  
Odejmując od powyższego wzoru wzór <math>(*)</math>, dostajemy wzór 21.
 
  
::<math>U_{2 n + 2} = P U^2_{n + 1} - 2 Q U_n U_{n + 1}</math>
+
<span style="font-size: 110%; font-weight: bold;">Uwaga C33</span><br/>
 +
Zauważmy, że w&nbsp;twierdzeniu Dirichleta na liczby <math>a</math> oraz <math>b</math> nałożone są minimalne warunki: <math>a \in \mathbb{Z}_+</math> i <math>b \in \mathbb{Z}</math>. Sytuacja w&nbsp;przypadku funkcji <math>\pi (n ; a, b)</math> jest odmienna – tutaj mamy <math>a \geqslant 2</math> oraz <math>0 \leqslant b \leqslant a - 1</math>. Jest tak dlatego, że podział liczb pierwszych, który odzwierciedla funkcja <math>\pi (n ; a, b)</math> jest podziałem pierwotnym, a&nbsp;twierdzenie Dirichleta jest tylko jego uzasadnieniem. Podział
 +
liczb pierwszych musi być też precyzyjnie określony, tak aby zachodził naturalny związek
  
Co należało pokazać.<br/>
+
::<math>\sum_{b = 0}^{a - 1} \pi (n ; a, b) = \pi (n)</math>
&#9633;
 
{{\Spoiler}}
 
  
 +
Oczywiście nie przeszkadza to w&nbsp;liczeniu liczb pierwszych w&nbsp;dowolnym ciągu arytmetycznym. Niech na przykład
  
 +
::<math>u_k = 7 k + 101 = 7 (k + 14) + 3 \qquad</math> gdzie <math>k = 0, 1, \ldots</math>
  
 +
Ilość liczb pierwszych w&nbsp;ciagu <math>(u_k)</math> jest równa
  
 +
::<math>\pi (n ; 7, 3) - \pi (7 \cdot 13 + 3 ; 7, 3) = \pi (n ; 7, 3) - 5</math>
  
== Obliczanie wyrazów ciągu Lucasa modulo <math>m</math> ==
 
  
<span style="font-size: 110%; font-weight: bold;">Przykład L14</span><br/>
 
Pokażemy, jak wykorzystać podane w&nbsp;twierdzeniu L13 wzory 19, 20, 21 i 16
 
  
::<math>U_{2 n} = 2 U_n U_{n + 1} - P U^2_n</math>
+
<span style="font-size: 110%; font-weight: bold;">Zadanie C34</span><br/>
 +
Pokazać, że dla dowolnej liczby całkowitej <math>m \geqslant 1</math>
  
::<math>U_{2 n + 1} = U^2_{n + 1} - Q U^2_n</math>
+
* wśród liczb naturalnych zawsze można wskazać <math>m</math> kolejnych liczb, które są złożone
 +
* w&nbsp;ciągu arytmetycznym <math>a k + b</math>, gdzie liczby <math>a</math> i <math>b</math> są względnie pierwsze, zawsze można wskazać <math>m</math> kolejnych wyrazów, które są złożone
  
::<math>U_{2 n + 2} = P U^2_{n + 1} - 2 Q U_n U_{n + 1}</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
 +
'''Punkt 1.'''<br/>
 +
W przypadku liczb naturalnych, łatwo widzimy, że kolejne liczby
  
::<math>V_n = 2 U_{n + 1} - P U_n</math>
+
::<math>(m + 1) ! + 2, \quad (m + 1) ! + 3, \quad \ldots, \quad (m + 1) ! + (m + 1)</math>
  
do szybkiego obliczania wyrazów ciągu Lucasa modulo <math>m</math>.
+
są liczbami złożonymi. Co oznacza, że dla dowolnej liczby naturalnej <math>m</math> zawsze możemy wskazać taką liczbę <math>n</math>, że <math>p_{n + 1} - p_n > m</math>.
  
 +
'''Punkt 2.'''<br/>
 +
W przypadku ciągu arytmetycznego <math>u_k = a k + b</math> rozważmy kolejne wyrazy ciągu począwszy od wskaźnika
  
Niech <math>P = 3</math>, <math>Q = 1</math>, <math>D = P^2 - 4 Q = 5</math>, <math>n = 22 = (10110)_2 = \sum_{j = 0}^{4} a_j \cdot 2^j</math>.
+
::<math>k_0 = \prod^{m - 1}_{j = 0} (a j + b)</math>
  
W tabeli przedstawione są kolejne kroki, jakie musimy wykonać, aby policzyć <math>U_n = U_{22}</math> modulo <math>m = 23</math>.
+
Łatwo zauważamy, że dla <math>k = k_0, k_0 + 1, \ldots, k_0 + (m - 1)</math> wyrazy ciągu arytmetycznego <math>u_k = a k + b</math> są liczbami złożonymi. Istotnie, niech <math>t = 0, 1, \ldots, m - 1</math> wtedy
  
::{| class="wikitable plainlinks"  style="font-size: 100%; text-align: center; margin-right: auto;"
+
::<math>u_k = a k + b =</math>
|-
 
! <math>\boldsymbol{j}</math> !! <math>\boldsymbol{a_j}</math> !! <math>\boldsymbol{k_j}</math> !! <math>\boldsymbol{U_{k_j}}</math> !! <math>\boldsymbol{U_{k_j + 1}}</math>
 
|-
 
| <math>4</math> || <math>1</math> || <math>(1)_2 = 1</math> || <math>U_1 = 1</math> || <math>U_2 = P = 3</math>
 
|-
 
| <math>3</math> || <math>0</math> || <math>(10)_2 = 2</math> || <math>U_2 = 2 U_1 U_2 - 3 U^2_1 = 6 - 3 = 3</math> || <math>U_3 = U^2_2 - 1 = 8</math>
 
|-
 
| <math>2</math> || <math>1</math> || <math>(101)_2 = 5</math> || <math>U_5 = U^2_3 - U^2_2 = 64 - 9 = 55 \equiv 9</math> || <math>U_6 = 3 U_3^2 - 2 U_2 U_3 = 192 - 48 = 144 \equiv 6</math>
 
|-
 
| <math>1</math> || <math>1</math> || <math>(1011)_2 = 11</math> || <math>U_{11} = U^2_6 - U^2_5 \equiv 36 - 81 \equiv - 45 \equiv 1</math> || <math>U_{12} = 3 U_6^2 - 2 U_5 U_6 \equiv 108 - 108 \equiv 0</math>
 
|-
 
| <math>0</math> || <math>0</math> || <math>(10110)_2 = 22</math> || <math>U_{22} = 2 U_{11} U_{12} - 3 U^2_{11} \equiv 0 - 3 \equiv 20</math> || <math>U_{23} = U^2_{12} - U^2_{11} \equiv 0 - 1 \equiv 22</math>
 
|}
 
  
W kolumnie <math>a_j</math> wypisujemy kolejne cyfry liczby <math>n = 22 = (10110)_2</math> zapisanej w&nbsp;układzie dwójkowym. Liczby w&nbsp;kolumnie <math>k_j</math> tworzymy, biorąc kolejne (od prawej do lewej) cyfry liczby <math>n</math> w&nbsp;zapisie dwójkowym. Postępując w&nbsp;ten sposób, w&nbsp;ostatnim wierszu mamy <math>k_j = n</math> i&nbsp;wyliczamy liczby <math>U_n</math> i <math>U_{n + 1}</math> modulo <math>m</math>.
+
:::<math>\! = a (k_0 + t) + b =</math>
  
Dla uproszczenia zapisu i&nbsp;ułatwienia zrozumienia liczbę <math>k_j</math> oznaczymy jako <math>r</math>, a <math>k_{j + 1}</math> jako <math>s</math>. Zauważmy, że
+
:::<math>\! = a k_0 + (a t + b) =</math>
  
:* tabela jest zbudowana tak, że musimy znaleźć wyrazy ciągu Lucasa o&nbsp;indeksie <math>r = k_j</math> oraz o&nbsp;indeksie o&nbsp;jeden większym: <math>r + 1 = k_j + 1</math>
+
:::<math>\! = a \prod^{m - 1}_{j = 0} (a j + b) + (a t + b)</math>
:* przejście do następnego wiersza (w dół) oznacza, że musimy znaleźć wyrazy o&nbsp;indeksie <math>s = k_{j + 1}</math> oraz o&nbsp;indeksie o&nbsp;jeden większym: <math>s + 1</math>
 
:* przechodząc do następnego wiersza, dotychczasowa liczba <math>r = k_j</math> powiększa się o&nbsp;kolejną cyfrę ( <math>0</math> lub <math>1</math> ), którą dopisujemy z&nbsp;prawej strony
 
:* dodanie na końcu liczby <math>r = k_j</math> zera podwaja liczbę <math>r</math>, czyli <math>s = k_{j + 1} = 2 r</math> oraz <math>s + 1 = 2 r + 1</math>
 
:* dodanie na końcu liczby <math>r = k_j</math> jedynki podwaja liczbę <math>r</math> i&nbsp;zwiększą ją o&nbsp;jeden, czyli <math>s = k_{j + 1} = 2 r + 1</math> oraz <math>s + 1 = 2 r + 2</math>
 
  
 +
i liczba <math>a t + b</math> dzieli iloczyn <math>\prod^{m - 1}_{j = 0} (a j + b)</math> dla <math>t = 0, \ldots, m - 1</math>. Co należało pokazać.
  
Dlatego, jeżeli kolejną dodaną cyfrą jest zero, to korzystamy ze wzorów
+
Wiemy, że jeżeli liczby <math>a</math> i <math>b</math> są względnie pierwsze, to w&nbsp;ciągu <math>a k + b</math> występuje nieskończenie wiele liczb pierwszych. Niech będą to liczby <math>q_1, q_2, \ldots, q_r, \ldots</math>. Uzyskany rezultat oznacza, że dla dowolnej liczby naturalnej <math>m</math> zawsze możemy wskazać taką liczbę <math>n</math>, że <math>q_{n + 1} - q_n \geqslant a (m + 1)</math><br/>
 +
&#9633;
 +
{{\Spoiler}}
  
::<math>U_s = U_{2 r} = 2 U_r U_{r + 1} - P U^2_r</math>
 
  
::<math>U_{s + 1} = U_{2 r + 1} = U^2_{r + 1} - Q U^2_r</math>
 
  
Gdy kolejną dodaną cyfrą jest jeden, to stosujemy wzory
+
<span style="font-size: 110%; font-weight: bold;">Przykład C35</span><br/>
 +
Rozważmy ciąg arytmetyczny <math>u_k = 3 k + 2</math> i&nbsp;wskaźnik
  
::<math>U_s = U_{2 r + 1} = U^2_{r + 1} - Q U^2_r</math>
+
::<math>k_0 = \prod^{12}_{j = 0} (3 j + 2) = 3091650738176000</math>
  
::<math>U_{s + 1} = U_{2 r + 2} = P U^2_{r + 1} - 2 Q U_r U_{r + 1}</math>
+
Trzynaście wyrazów tego szeregu dla <math>k = k_0 + t</math>, gdzie <math>t = 0, 1, \ldots, 12</math> to oczywiście liczby złożone, ale wyrazy dla <math>k = k_0 - 1</math> i <math>k = k_0 + 13</math> są liczbami pierwszymi.
  
 +
Przeszukując ciąg <math>u_k = 3 k + 2</math> możemy łatwo znaleźć, że pierwsze trzynaście kolejnych wyrazów złożonych pojawia się już dla <math>k = 370, 371, \ldots, 382</math>.
  
Korzystając ze wzoru <math>V_n = 2 U_{n + 1} - P U_n</math>, mamy
 
  
::<math>V_{22} = 2 U_{23} - 3 U_{22} \equiv 44 - 60 \equiv - 16 \equiv 7 \pmod{23}</math>
 
  
Ostatecznie otrzymujemy
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C36</span><br/>
 +
Jeżeli <math>n \geqslant 3</math>, to istnieje <math>n</math> kolejnych liczb naturalnych, wśród których znajduje się dokładnie <math>r \leqslant \pi (n)</math> liczb pierwszych.
  
::<math>U_{22} \equiv 20 \pmod{23} \quad</math> oraz <math>\quad V_{22} \equiv 7 \pmod{23}</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
Warunek <math>n \geqslant 3</math> nie wynika z&nbsp;potrzeb dowodu, a&nbsp;jedynie pomija sytuacje nietypowe, których twierdzenie nie obejmuje. Zawsze istnieje jedna liczba naturalna, która jest liczbą pierwszą i&nbsp;łatwo możemy wskazać dwie kolejne liczby naturalne będące liczbami pierwszymi.
  
 +
Niech <math>k \in \mathbb{N}</math>. Wartość funkcji
  
 +
::<math>Q(k, n) = \pi (k + n) - \pi (k)</math>
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L15</span><br/>
+
jest równa ilości liczb pierwszych wśród <math>n</math> kolejnych liczb naturalnych od liczby <math>k + 1</math> do liczby <math>k + n</math>.
Uogólniając postępowanie przedstawione w&nbsp;przykładzie L14, możemy napisać program w&nbsp;PARI/GP do szybkiego obliczania wyrazów ciągu Lucasa <math>U_n (P, Q)</math> i <math>V_n (P, Q)</math> modulo <math>m</math>.
 
  
<span style="font-size: 90%; color:black;">modLucas(n, P, Q, m) =
+
Uwzględniając, że wypisane niżej wyrażenia w&nbsp;nawiasach kwadratowych mogą przyjmować jedynie dwie wartości <math>0</math> lub <math>1</math>, dostajemy
{
 
'''local'''(A, i, s, U, U2, V, W, W2);
 
'''if'''( m == 1, '''return'''([0, 0]) );
 
'''if'''( n == 0, '''return'''([0, 2 % m]) );
 
A = '''digits'''(n, 2); \\ otrzymujemy wektor cyfr liczby n w układzie dwójkowym
 
s = '''length'''(A); \\ długość wektora A
 
U = 1;
 
W = P;
 
i = 1;
 
'''while'''( i++ <= s,
 
        '''if'''( A[i] == 0,  U2 = 2*U*W - P*U^2;  W2 = W^2 - Q*U^2 );
 
        '''if'''( A[i] == 1,  U2 = W^2 - Q*U^2;  W2 = P*W^2 - 2*Q*U*W );
 
        U = U2 % m;
 
        W = W2 % m;
 
      );
 
V = (2*W - P*U) % m;
 
'''return'''([U, V]);
 
}</span>
 
  
 +
:* <math>\biggl| Q (k + 1, n) - Q (k, n) \biggr| = \biggl| \bigl[\pi (k + n + 1) - \pi (k + n) \bigr] - \bigl[\pi (k + 1) - \pi (k) \bigr] \biggr| \leqslant 1</math>
  
 +
Ponadto mamy
  
 +
:* <math>Q(0, n) = \pi (n) \qquad</math> bo <math>\pi (0) = 0</math>
 +
:* <math>Q((n + 1) ! + 1, n) = 0 \qquad</math> bo liczby <math>(n + 1) ! + 2, \ldots, (n + 1) ! + (n + 1)</math> są liczbami złożonymi
  
 +
Ponieważ wartości funkcji <math>Q(k, n)</math> mogą zmieniać się tylko o <math>- 1</math>, <math>0</math> lub <math>1</math>, to <math>Q(k, n)</math> musi przyjmować '''wszystkie''' wartości całkowite od <math>0</math> do <math>\pi (n)</math>. Wynika stąd, że istnieje taka liczba <math>k_r</math>, że <math>Q(k_r, n) = r</math>, gdzie <math>0 \leqslant r \leqslant \pi (n)</math>.
  
== Podzielność wyrazów <math>U_n (P, Q)</math> przez liczbę pierwszą nieparzystą ==
 
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L16</span><br/>
+
::[[File: C_Q10.png|none]]
Niech <math>p</math> będzie liczbą pierwszą nieparzystą. W&nbsp;przypadku, gdy <math>p \nmid P Q</math> nie możemy nic powiedzieć o&nbsp;podzielności wyrazów <math>U_n</math> przez <math>p</math>. Przykładowo, jeżeli <math>P \equiv 1 \pmod{p} \;</math> <math>\text{i} \;\; Q \equiv 1 \pmod{p}</math>, to modulo <math>p</math>, mamy
+
 
 +
Fragment wykresu funkcji <math>Q(k, 10)</math>. Widzimy, że dla <math>k = 113</math> po raz pierwszy mamy <math>Q(k, 10) = 0</math>, a&nbsp;funkcja <math>Q(k, 10)</math> przyjmuje wszystkie wartości całkowite od <math>0</math> do <math>5</math>.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
::<math>(U_n) \equiv (0, 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, - 1, \ldots)</math>
 
  
W przypadku, gdy <math>P \equiv 2 \pmod{p} \;</math> <math>\text{i} \;\; Q \equiv 1 \pmod{p}</math>, to modulo <math>p</math> mamy
 
  
::<math>(U_n) \equiv (0, 1, 2, \ldots, p - 1, 0, 1, 2, \ldots, p - 1, 0, 1, 2, \ldots, p - 1, \ldots)</math>
+
<span style="font-size: 110%; font-weight: bold;">Przykład C37</span><br/>
 +
Czytelnik może łatwo sprawdzić, że ciąg <math>( 1308, \ldots, 1407 )</math> stu kolejnych liczb całkowitych zawiera dokładnie <math>8</math> liczb pierwszych.
  
Sytuacja wygląda inaczej, gdy <math>p \mid P Q</math>.
 
  
  
 +
<span style="font-size: 110%; font-weight: bold;">Zadanie C38</span><br/>
 +
Pokazać, nie korzystając z&nbsp;twierdzenia C36, że istnieje <math>1000</math> kolejnych liczb naturalnych, wśród których jest dokładnie jedna liczba pierwsza.
  
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L17</span><br/>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
Niech <math>p</math> będzie liczbą pierwszą nieparzystą.
+
Zauważmy, że <math>1000</math> kolejnych liczb naturalnych
  
::{| border="0"
+
::<math>1001! + 2, 1001! + 3, \ldots, 1001! + 1001</math>
|-style=height:1.9em
 
| &#9679;&nbsp;&nbsp;&nbsp; jeżeli <math>\; p \mid P \;</math> <math>\text{i} \;\; p \mid Q , \;</math> to <math>\; p \mid U_n \;</math> dla <math>n \geqslant 2</math>
 
|-style=height:1.9em
 
| &#9679;&nbsp;&nbsp;&nbsp; jeżeli <math>\; p \mid P \;</math> <math>\text{i} \;\; p \nmid Q , \;</math> to <math>\; p \mid U_{2 n} \;</math> i <math>\; p \nmid U_{2 n + 1}</math>
 
|-style=height:1.9em
 
| &#9679;&nbsp;&nbsp;&nbsp; jeżeli <math>\; p \nmid P \;</math> <math>\text{i} \;\; p \mid Q , \;</math> to <math>\; p \nmid U_n \;</math> dla <math>n \geqslant 1</math>
 
|-style=height:1.9em
 
| &#9679;&nbsp;&nbsp;&nbsp; jeżeli <math>\; p \mid Q , \;</math> to <math>\; p \mid U_n</math>, gdzie <math>n \geqslant 2</math>, wtedy i&nbsp;tylko wtedy, gdy <math>\; p \mid P</math>
 
|-style=height:1.9em
 
| &#9679;&nbsp;&nbsp;&nbsp; jeżeli <math>\; p \nmid P \;</math> <math>\text{i} \;\; p \mid D , \;</math> to <math>\; p \mid U_n \;</math> wtedy i&nbsp;tylko wtedy, gdy <math>p \mid n</math>
 
|}
 
  
Założenie, że <math>p \nmid P</math> w&nbsp;ostatnim punkcie jest istotne. Gdy <math>\; p \mid P \;</math> i <math>\; p \mid D , \;</math> to <math>\; p \mid Q \;</math> i&nbsp;otrzymujemy punkt pierwszy.
+
nie zawiera żadnej liczby pierwszej. Wielokrotnie zmniejszając wszystkie wypisane wyżej liczby o&nbsp;jeden, aż do chwili, gdy pierwsza z&nbsp;wypisanych liczb będzie liczbą pierwszą uzyskamy <math>1000</math> kolejnych liczb naturalnych, wśród których jest dokładnie jedna liczba pierwsza.
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
+
Uwaga: dopiero liczba <math>1001! - 1733</math> jest pierwsza.<br/>
'''Punkt 1.'''
+
&#9633;
 +
{{\Spoiler}}
  
Ponieważ <math>U_2 = P</math>, zatem <math>p \mid U_2</math>. Dla <math>n \geqslant 3</math> wyrażenie <math>U_n = P U_{n - 1} - Q U_{n - 2}</math> jest podzielne przez <math>p</math>.
 
  
'''Punkt 2.'''
 
  
Indeksy parzyste. Indukcja matematyczna. Mamy <math>U_0 = 0</math> i <math>U_2 = P</math>, zatem <math>p \mid U_0</math> i <math>p \mid U_2</math>. Zakładając, że <math>p \mid U_{2 n}</math>, z definicji ciągu <math>(U_k)</math>, otrzymujemy dla <math>U_{2 n + 2}</math>
+
<span style="font-size: 110%; font-weight: bold;">Zadanie C39</span><br/>
 +
Pokazać, że istnieje <math>20</math> kolejnych liczb naturalnych postaci <math>6 k + 1</math>, wśród których jest dokładnie <math>5</math> liczb pierwszych.
  
::<math>U_{2 n + 2} = P U_{2 n - 1} - Q U_{2 n}</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
 +
Rozwiązywanie zadania rozpoczniemy od dwóch spostrzeżeń
  
Z założenia indukcyjnego wynika, że <math>p \mid U_{2 n + 2}</math>, zatem na mocy zasady indukcji matematycznej twierdzenie jest prawdziwe dla wszystkich <math>n \geqslant 0</math>.
+
:* wśród pierwszych <math>20</math> liczb naturalnych postaci <math>6 k + 1</math> jest <math>13</math> liczb pierwszych
 +
:* w&nbsp;ciągu <math>6 k + 1</math> istnieją dowolnie długie przedziały pozbawione liczb pierwszych (zobacz zadanie C34), zatem istnieje <math>20</math> kolejnych liczb naturalnych postaci <math>6 k + 1</math>, wśród których nie ma ani jednej liczby pierwszej
  
Indeksy nieparzyste. Indukcja matematyczna. Mamy <math>U_1 = 1</math> i <math>U_3 = P^2 - Q</math>, zatem <math>p \nmid U_1</math> i <math>p \nmid U_3</math>. Zakładając, że <math>p \nmid U_{2 n - 1}</math>, z definicji ciągu <math>(U_k)</math>, otrzymujemy dla <math>U_{2 n + 1}</math>
+
Pierwsze spostrzeżenie pokazuje, że rozwiązanie problemu jest potencjalnie możliwe. Rozwiązanie mogłoby nie istnieć, gdybyśmy szukali <math>20</math> liczb naturalnych postaci <math>6 k + 1</math> wśród których jest, powiedzmy, <math>15</math> liczb pierwszych.
  
::<math>U_{2 n + 1} = P U_{2 n} - Q U_{2 n - 1}</math>
+
Drugie spostrzeżenie mówi nam, że ilość liczb pierwszych wśród kolejnych <math>20</math> liczb naturalnych postaci <math>6 k + 1</math> zmienia się od <math>13</math> do <math>0</math>. Analiza przebiegu tych zmian jest kluczem do dowodu twierdzenia.
  
Z założenia indukcyjnego wynika, że <math>p \nmid U_{2 n + 1}</math>, zatem na mocy zasady indukcji matematycznej twierdzenie jest prawdziwe dla wszystkich <math>n \geqslant 1</math>.
 
  
'''Punkt 3.'''
+
Zbadajmy zatem, jak zmienia się ilość liczb pierwszych wśród kolejnych <math>20</math> liczb naturalnych postaci <math>6 k + 1</math>. Rozważmy ciąg <math>a_k = 6 k + 1</math>, gdzie <math>k = 0, 1, 2, \ldots</math>
  
Indukcja matematyczna. Mamy <math>U_1 = 1</math> i <math>U_2 = P</math>, zatem <math>p \nmid U_1</math> i <math>p \nmid U_2</math>. Zakładając, że <math>p \nmid U_n</math> zachodzi dla wszystkich liczb całkowitych dodatnich nie większych od <math>n</math>, z&nbsp;definicji ciągu <math>(U_n)</math>
+
<math>(a_k) = (1, \mathbf{7}, \mathbf{13}, \mathbf{19}, 25, \mathbf{31}, \mathbf{37}, \mathbf{43}, 49, 55, \mathbf{61}, \mathbf{67}, \mathbf{73}, \mathbf{79}, 85, 91, \mathbf{97}, \mathbf{103}, \mathbf{109}, 115, 121, \mathbf{127}, 133, \mathbf{139}, 145, \mathbf{151}, \mathbf{157}, \mathbf{163}, 169, 175, \mathbf{181}, 187, \mathbf{193}, \mathbf{199}, 205, \mathbf{211}, \ldots)</math>
otrzymujemy dla <math>n + 1</math>
 
  
::<math>U_{n + 1} = P U_n - Q U_{n - 1}</math>
+
Liczby pierwsze zostały pogrubione.
  
Z założenia indukcyjnego wynika, że <math>p \nmid U_{n + 1}</math>, zatem na mocy zasady indukcji matematycznej twierdzenie jest prawdziwe dla wszystkich liczb <math>n \geqslant 1</math>.
 
  
'''Punkt 4.'''
+
Niech <math>(B^n)</math> będzie fragmentem ciągu <math>(a_k)</math> rozpoczynającym się od <math>n</math>-tego wyrazu ciągu i&nbsp;złożonym z <math>20</math> kolejnych wyrazów ciągu <math>(a_k)</math>. Przykładowo mamy
  
Wynika z&nbsp;punktów pierwszego i&nbsp;trzeciego.
+
<math>(B^1) = (1, \mathbf{7}, \mathbf{13}, \mathbf{19}, 25, \mathbf{31}, \mathbf{37}, \mathbf{43}, 49, 55, \mathbf{61}, \mathbf{67}, \mathbf{73}, \mathbf{79}, 85, 91, \mathbf{97}, \mathbf{103}, \mathbf{109}, 115 )</math>
  
'''Punkt 5.'''
+
<math>(B^2) = ( \mathbf{7}, \mathbf{13}, \mathbf{19}, 25, \mathbf{31}, \mathbf{37}, \mathbf{43}, 49, 55, \mathbf{61}, \mathbf{67}, \mathbf{73}, \mathbf{79}, 85, 91, \mathbf{97}, \mathbf{103}, \mathbf{109}, 115, 121 )</math>
  
Z twierdzenia L7 wiemy, że
+
<math>(B^3) = ( \mathbf{13}, \mathbf{19}, 25, \mathbf{31}, \mathbf{37}, \mathbf{43}, 49, 55, \mathbf{61}, \mathbf{67}, \mathbf{73}, \mathbf{79}, 85, 91, \mathbf{97}, \mathbf{103}, \mathbf{109}, 115, 121, \mathbf{127} )</math>
  
::<math>2^{n - 1} U_n = \sum_{k = 0}^{\lfloor (n - 1) / 2 \rfloor} \binom{n}{2 k + 1} P^{n - 2 k - 1} D^k</math>
 
  
::::<math>\;\; = n P^{n - 1} + \binom{n}{3} P^{n - 3} D + \binom{n}{5} P^{n - 5} D^2 + \ldots +
+
Musimy zrozumieć, jak przejście od ciągu <math>(B^n)</math> do ciągu <math>(B^{n + 1})</math>
\begin{cases}
+
wpływa na ilość liczb pierwszych w&nbsp;tych ciągach.
n P D^{(n - 2) / 2} & \text{gdy }n\text{ jest parzyste} \\
 
D^{(n - 1) / 2} & \text{gdy }n\text{ jest nieparzyste}
 
\end{cases}</math>
 
  
Z założenia <math>p \mid D</math>, zatem modulo <math>p</math> dostajemy
+
* jeżeli najmniejszy wyraz ciągu <math>(B^n)</math> jest liczbą złożoną, to po przejściu do ciągu <math>(B^{n + 1})</math> ilość liczb pierwszych w&nbsp;tym ciągu w&nbsp;stosunku do ilości liczb pierwszych w&nbsp;ciągu <math>(B^n)</math> może
 +
** pozostać bez zmian (w przypadku, gdy największy wyraz ciągu <math>(B^{n + 1})</math> jest liczbą złożoną)
 +
** zwiększyć się o&nbsp;jeden (w przypadku, gdy największy wyraz ciągu <math>(B^{n + 1})</math> jest liczbą pierwszą)
  
::<math>2^{n - 1} U_n \equiv n P^{n - 1} \pmod{p}</math>
+
* jeżeli najmniejszy wyraz ciągu <math>(B^n)</math> jest liczbą pierwszą, to po przejściu do ciągu <math>(B^{n + 1})</math> ilość liczb pierwszych w&nbsp;tym ciągu w&nbsp;stosunku do ilości liczb pierwszych w&nbsp;ciągu <math>(B^n)</math> może
 +
** zmniejszyć się o&nbsp;jeden (w przypadku, gdy największy wyraz ciągu <math>(B^{n + 1})</math> jest liczbą złożoną)
 +
** pozostać bez zmian (w przypadku, gdy największy wyraz ciągu <math>(B^{n + 1})</math> jest liczbą pierwszą)
  
Ponieważ <math>p \nmid P</math>, zatem <math>p \mid U_n</math> wtedy i&nbsp;tylko wtedy, gdy <math>p \mid n</math>.
 
Co należało pokazać.<br/>
 
&#9633;
 
{{\Spoiler}}
 
  
 +
Wynika stąd, że przechodząc od ciągu <math>(B^n)</math> do ciągu <math>(B^{n + 1})</math> ilość liczb pierwszych może się zmienić o <math>- 1</math>, <math>0</math> lub <math>1</math>. Z&nbsp;drugiego ze spostrzeżeń uczynionych na początku dowodu wynika istnienie takiej liczby <math>r</math>, że wśród ciągów
  
 +
::<math>(B^1), (B^2), \ldots, (B^r)</math>
  
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L18</span><br/>
+
ilość liczb pierwszych będzie przyjmowała '''wszystkie''' możliwe wartości od liczby <math>13</math> do liczby <math>0</math>. Co zapewnia istnienie takich <math>20</math> kolejnych liczb naturalnych postaci <math>6 k + 1</math>, że wśród nich jest dokładnie <math>5</math> liczb pierwszych.<br/>
Jeżeli <math>d</math> jest nieparzystym dzielnikiem <math>Q</math>, to dla <math>n \geqslant 2</math> jest
+
&#9633;
 +
{{\Spoiler}}
  
::<math>U_n \equiv P^{n - 1} \pmod{d}</math>
 
  
W szczególności, gdy liczba pierwsza nieparzysta <math>p</math> jest dzielnikiem <math>Q</math> i <math>p \nmid P</math>, to
 
  
::<math>U_p \equiv 1 \pmod{p}</math>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C40</span><br/>
 +
Niech <math>a, b \in \mathbb{Z}</math> oraz <math>a \geqslant 2</math> i <math>0 \leqslant b \leqslant a - 1</math>. Jeżeli liczby <math>a</math> oraz <math>b</math> są względnie pierwsze, to istnieje <math>n</math> kolejnych liczb postaci <math>a k + b</math>, wśród których znajduje się dokładnie <math>r \leqslant \pi (a (n - 1) + b ; a, b)</math> liczb pierwszych.
  
 
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
Oznaczmy <math>\delta = \sqrt{D}</math>, zatem <math>2 \alpha = P + \delta</math> i <math>2 \beta = P - \delta</math>. Ze wzoru dwumianowego, mamy
+
Twierdzenie można udowodnić uogólniając dowód twierdzenia C36 lub wykorzystując metodę zastosowaną w&nbsp;rozwiązaniu zadania C39.<br/>
 +
&#9633;
 +
{{\Spoiler}}
 +
 
  
::<math>2^n \alpha^n = (P + \delta)^n = \sum_{j = 0}^{n} \binom{n}{j} P^{n - j} \delta^j</math>
 
  
::<math>2^n \beta^n = (P - \delta)^n = \sum_{j = 0}^{n} \binom{n}{j} P^{n - j} (- \delta)^j</math>
+
<span style="font-size: 110%; font-weight: bold;">Zadanie C41</span><br/>
 +
Niech <math>p \geqslant 5</math> będzie liczbą pierwszą. Pokazać, że w&nbsp;ciągu <math>6 k + 1</math> występują kwadraty wszystkich liczb pierwszych <math>p</math>.
  
 +
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
 +
Wiemy, że liczby pierwsze nieparzyste <math>p \geqslant 5</math> mogą być postaci <math>6 k + 1</math> lub <math>6 k + 5</math>. Ponieważ
  
Obliczając różnicę wyjściowych wzorów, mamy
+
::<math>(6 k + 1)^2 = 6 (6 k^2 + 2 k) + 1</math>
  
::<math>2^n (\alpha^n - \beta^n) = \sum_{j = 0}^{n} \binom{n}{j} P^{n - j} (\delta^j - (- \delta)^j) =</math>
+
::<math>(6 k + 5)^2 = 6 (6 k^2 + 10 k + 4) + 1</math>
  
:::::<math>\quad \: = \underset{j \; \text{nieparzyste}}{\sum_{j = 1}^{n}} \binom{n}{j} P^{n - j} \cdot 2 \delta^j</math>
+
zatem kwadraty liczb pierwszych są postaci <math>6 k + 1</math> i&nbsp;nie mogą występować w&nbsp;ciągu postaci <math>6 k + 5</math>.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
:::::<math>\quad \: = 2 \underset{j \; \text{nieparzyste}}{\sum_{j = 1}^{n}} \binom{n}{j} P^{n - j} \cdot \delta \cdot D^{(j - 1) / 2}</math>
 
  
Rozpatrując powyższą równość modulo <math>Q</math> dostajemy (zobacz L43)
 
  
::<math>2^{n - 1} \cdot {\small\frac{\alpha^n - \beta^n}{\delta}} = 2^{n - 1} U_n \equiv \underset{j \; \text{nieparzyste}}{\sum_{j = 1}^{n}} \binom{n}{j} P^{n - j} \cdot P^{j - 1}</math>
+
<span style="font-size: 110%; font-weight: bold;">Zadanie C42</span><br/>
 +
Dany jest ciąg arytmetyczny <math>a k + b</math>, gdzie liczby <math>a</math> i <math>b</math> są względnie pierwsze. Pokazać, że
  
:::::::::<math>\;\:\: \equiv P^{n - 1} \underset{j \; \text{nieparzyste}}{\sum_{j = 1}^{n}} \binom{n}{j}</math>
+
* jeżeli liczba pierwsza <math>p</math> dzieli <math>a</math>, to żaden wyraz ciągu <math>a k + b</math> nie jest podzielny przez <math>p</math>
 +
* jeżeli liczba pierwsza <math>p</math> nie dzieli <math>a</math>, to istnieje nieskończenie wiele wyrazów ciągu <math>a k + b</math>, które są podzielne przez <math>p</math>
  
:::::::::<math>\;\:\: \equiv 2^{n - 1} P^{n - 1}</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
 +
'''Punkt 1.'''<br/>
 +
Zauważmy, że liczby <math>a</math> i <math>b</math> są względnie pierwsze, zatem liczba pierwsza <math>p</math> nie może jednocześnie dzielić liczb <math>a</math> i <math>b</math>. Ponieważ z&nbsp;założenia <math>p|a</math>, to wynika stąd, że <math>p</math> nie dzieli <math>b</math>. Jeśli tak, to
  
Czyli
+
::<math>a k + b = (n p) k + b</math>
  
::<math>2^{n - 1} (U_n - P^{n - 1}) \equiv 0 \pmod{Q}</math>
+
i <math>p</math> nie dzieli żadnej liczby postaci <math>a k + b</math>.
  
Ponieważ <math>Q</math> dzieli <math>2^{n - 1} (U_n - P^{n - 1})</math>, to tym bardziej <math>d</math> dzieli <math>2^{n - 1} (U_n - P^{n - 1})</math>. Z założenia <math>\gcd (d, 2^{n - 1}) = 1</math>, zatem <math>d</math> dzieli <math>U_n - P^{n - 1}</math> (zobacz C72).
+
'''Punkt 2.'''<br/>
 +
<span style="border-bottom-style: double;">Pierwszy sposób</span><br/><br/>
 +
Niech <math>k_0 \in \mathbb{N}</math>. Przypuśćmy, że dla pewnych różnych liczb naturalnych <math>i, j</math> takich, że <math>1 \leqslant i < j \leqslant p</math> liczby <math>a(k_0 + i) + b</math> oraz <math>a(k_0 + j) + b</math> dają tę samą resztę przy dzieleniu przez liczbę pierwszą <math>p</math>. Zatem różnica tych liczb jest podzielna przez <math>p</math>
  
W przypadku szczególnym, gdy <math>d = p</math>, gdzie <math>p</math> jest nieparzystą liczbą pierwszą i <math>p \nmid P</math>, z&nbsp;twierdzenia Fermata otrzymujemy natychmiast
+
::<math>p| [a (k_0 + j) + b] - [a (k_0 + i) + b]</math>
  
::<math>U_p \equiv P^{p - 1} \equiv 1 \pmod{p}</math>
+
czyli
  
Co należało pokazać.<br/>
+
::<math>p|a (j - i)</math>
&#9633;
 
{{\Spoiler}}
 
  
 +
Ponieważ <math>p \nmid a</math> to na mocy lematu Euklidesa (twierdzenie C72), mamy
  
 +
::<math>p| (j - i)</math>
  
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L19</span><br/>
+
co jest niemożliwe, bo <math>1 \leqslant j - i \leqslant p - 1 < p</math>.
Niech <math>D = P^2 - 4 Q</math>, a <math>(D \mid p)</math> oznacza symbol Legendre'a, gdzie <math>p</math> jest liczbą pierwszą nieparzystą i <math>p \nmid Q</math>. Mamy
 
  
::{| border="0"
+
Zatem reszty <math>r_1, r_2, \ldots, r_p</math> są wszystkie różne, a&nbsp;ponieważ jest ich <math>p</math>, czyli tyle ile jest różnych reszt z&nbsp;dzielenia przez liczbę <math>p</math>, to zbiór tych reszt jest identyczny ze zbiorem reszt z&nbsp;dzielenia przez <math>p</math>, czyli ze zbiorem <math>S = \{ 0, 1, 2, \ldots, p - 1 \}</math>. W&nbsp;szczególności wynika stąd, że wśród <math>p</math> kolejnych wyrazów ciągu arytmetycznego <math>a k + b</math> jeden z&nbsp;tych wyrazów jest podzielny przez <math>p</math>. Zatem istnieje nieskończenie wiele wyrazów ciągu <math>a k + b</math>, które są podzielne przez <math>p</math>.
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; <math>U_p \equiv (D \mid p) \pmod{p}</math>
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; jeżeli <math>(D \mid p) = - 1 , \;</math> to <math>\; p \mid U_{p + 1}</math>
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; jeżeli <math>(D \mid p) = 1 , \;</math> to <math>\; p \mid U_{p - 1}</math>
 
|}
 
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 
'''Punkt 1.'''
 
  
Zauważmy, że przypadek gdy <math>p \mid Q</math>, omówiliśmy w&nbsp;twierdzeniu poprzednim. Z&nbsp;założenia <math>p</math> jest liczbą pierwszą nieparzystą. Z&nbsp;twierdzenia L7, w&nbsp;przypadku nieparzystego <math>n = p</math>, otrzymujemy
+
<span style="border-bottom-style: double;">Drugi sposób</span><br/><br/>
 +
Problem sprowadza się do wykazania istnienia nieskończenie wielu par liczb naturalnych <math>(k, n)</math>, takich że
  
::<math>2^{p - 1} U_p = p P^{p - 1} + \binom{p}{3} P^{p - 3} D + \binom{p}{5} P^{p - 5} D^2 + \ldots + \binom{p}{p-2} P^2 D^{(p - 3) / 2} + D^{(p - 1) / 2}</math>
+
::<math>a k + b = n p</math>
  
Ponieważ dla każdego <math>k \in [1, p - 1]</math> (zobacz L43)
+
Co z&nbsp;kolei sprowadza się do badania rozwiązań całkowitych równania
  
::<math>\binom{p}{k} \equiv 0 \pmod{p}</math>
+
::<math>n p - a k = b</math>
  
to modulo <math>p</math> dostajemy (zobacz J28)
+
Zauważmy, że ponieważ <math>p \nmid a</math>, to liczby <math>a</math> i <math>p</math> są względnie pierwsze. Zatem ich największym wspólnym dzielnikiem jest liczba <math>1</math>. Na mocy twierdzenia C76 równanie to ma nieskończenie wiele rozwiązań w&nbsp;liczbach całkowitych
  
::<math>2^{p - 1} U_p \equiv U_p \equiv D^{(p - 1) / 2} \equiv (D \mid p) \pmod{p}</math>
+
::<math>n = n_0 + p t</math>
 +
::<math>k = k_0 + a t</math>
  
'''Punkt 2.'''
+
gdzie <math>t</math> jest dowolną liczbą całkowitą, a&nbsp;para liczb <math>(n_0, k_0)</math> jest dowolnym rozwiązaniem tego równania. Widzimy, że dla dostatecznie dużych liczb <math>t</math> zawsze możemy uzyskać takie <math>n</math> i <math>k</math>, że <math>n, k \in \mathbb{Z}_+</math>. Pokazaliśmy w&nbsp;ten sposób, że w&nbsp;ciągu arytmetycznym <math>a k + b</math> istnieje nieskończenie wiele wyrazów podzielnych przez liczbę pierwszą <math>p</math>.
  
Zauważmy, że warunek <math>(D \mid p) = - 1</math> nie może być spełniony, gdy <math>p \mid Q</math>. Istotnie, gdy <math>p \mid Q</math>, to <math>D = P^2 - 4 Q \equiv P^2 \pmod{p}</math>, czyli
 
  
::<math>(D \mid p) = (P^2 \mid p) = (P \mid p)^2 = 0 , \;</math> gdy <math>p \mid P</math>
+
<span style="border-bottom-style: double;">Trzeci sposób</span><br/><br/>
 +
Zauważmy, że ponieważ <math>p \nmid a</math>, to liczby <math>a</math> i <math>p</math> są względnie pierwsze. Zatem ich największym wspólnym dzielnikiem jest liczba <math>1</math>. Lemat Bézouta zapewnia istnienie takich liczb całkowitych <math>x</math> i <math>y</math>, że
  
lub
+
::<math>a x + p y = 1</math>
  
::<math>(D \mid p) = (P^2 \mid p) = (P \mid p)^2 = 1 , \;</math> gdy <math>p \nmid P</math>
+
Niech <math>k_0 = r p - b x</math>, gdzie <math>r</math> jest dowolną liczbą całkowitą dodatnią, ale na tyle dużą, aby <math>k_0</math> była liczbą dodatnią bez względu na znak iloczynu <math>b x</math>. Łatwo sprawdzamy, że liczba <math>a k_0 + b</math> jest podzielna przez <math>p</math>
  
i nie może być <math>(D \mid p) = - 1</math>.
+
::<math>a k_0 + b = a (r p - b x) + b =</math>
  
Dla parzystego <math>n = p + 1</math> otrzymujemy z&nbsp;twierdzenia L7
+
::::<math>\;\; = a r p - a b x + b =</math>
  
::<math>2^p U_{p + 1} = (p + 1) P^p + \binom{p + 1}{3} P^{p - 2} D + \binom{p + 1}{5} P^{p - 4} D^2 + \ldots + \binom{p + 1}{p - 2} P^3 D^{(p - 3) / 2} + (p + 1) P D^{(p - 1) / 2}</math>
+
::::<math>\;\; = a r p + b (1 - a x) =</math>
  
Ponieważ dla <math>k \in [2, p - 1]</math> (zobacz L44)
+
::::<math>\;\; = a r p + b p y =</math>
  
::<math>\binom{p + 1}{k} \equiv 0 \pmod{p}</math>
+
::::<math>\;\; = p (a r + b y)</math>
  
to modulo <math>p</math> dostajemy
+
Zatem w&nbsp;ciągu <math>a k + b</math> istnieje przynajmniej jeden wyraz podzielny przez liczbę pierwszą <math>p</math>. Jeśli tak, to w&nbsp;ciągu arytmetycznym <math>a k + b</math> istnieje nieskończenie wiele liczb podzielnych przez <math>p</math>, bo dla <math>k = k_0 + s p</math>, gdzie <math>s \in \mathbb{N}</math>, mamy
  
::<math>2 U_{p + 1} \equiv P + P D^{(p - 1) / 2} \pmod{p}</math>
+
::<math>a k + b = a (k_0 + s p) + b = a s p + (a k_0 + b)</math>
  
 +
Czyli <math>p|a k + b</math>.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
Z założenia <math>D</math> jest liczbą niekwadratową modulo <math>p</math>, zatem <math>D^{(p - 1) / 2} \equiv - 1 \pmod{p}</math> (zobacz J25). Skąd wynika natychmiast, że
 
  
::<math>2 U_{p + 1} \equiv 0 \pmod{p}</math>
 
  
Czyli <math>p \mid U_{p + 1}</math>.
+
<span style="font-size: 110%; font-weight: bold;">Uwaga C43</span><br/>
 +
Łatwo możemy napisać w&nbsp;PARI/GP funkcję, która zwraca najmniejszą liczbę naturalną <math>k_0</math>, dla której wyraz ciągu arytmetycznego <math>a k + b</math> jest podzielny przez <math>p</math> (przy założeniu, że liczby <math>a</math> i <math>p</math> są względnie pierwsze).
  
'''Punkt 3.'''
+
f(a,b,p) = lift( Mod(-b,p)*Mod(a,p)^(-1) )
  
Dla parzystego <math>n = p - 1</math> otrzymujemy z&nbsp;twierdzenia L7
 
  
::<math>2^{p - 2} U_{p - 1} = (p - 1) P^{p - 2} + \binom{p - 1}{3} P^{p - 4} D + \binom{p - 1}{5} P^{p - 6} D^2 + \ldots + \binom{p - 1}{p - 4} P^3 D^{(p - 5) / 2} + (p - 1) P D^{(p - 3) / 2}</math>
 
  
Ponieważ dla <math>k \in [0, p - 1]</math> (zobacz L45)
 
  
::<math>\binom{p - 1}{k} \equiv (- 1)^k \pmod{p}</math>
 
  
to modulo <math>p</math> mamy
+
== Ciągi nieskończone i&nbsp;liczby pierwsze ==
  
::<math>2^{p - 2} U_{p - 1} \equiv - (P^{p - 2} + P^{p - 4} D + P^{p - 6} D^2 + \ldots + P D^{(p - 3) / 2}) \pmod{p}</math>
+
<span style="font-size: 110%; font-weight: bold;">Uwaga C44</span><br/>
 +
Choć wiele ciągów jest dobrze znanych i&nbsp;równie dobrze zbadanych, to nie wiemy, czy zawierają one nieskończenie wiele liczb pierwszych. Przykładowo
  
::::<math>\quad \,\, \equiv - P (P^{p - 3} + P^{p - 5} D + P^{p - 7} D^2 + \ldots + D^{(p - 3) / 2}) \pmod{p}</math>
+
::{| class="wikitable plainlinks"  style="font-size: 100%; text-align: left; margin-right: auto;"
 +
|-
 +
| <math>\quad 1. \quad</math>
 +
| <math>a_n = n^2 + 1</math>
 +
| [https://oeis.org/A002496 A002496]
 +
|-
 +
| <math>\quad 2. \quad</math>
 +
| <math>b_n = n^2 - n - 1</math>
 +
| [https://oeis.org/A002327 A002327]
 +
|-
 +
| <math>\quad 3. \quad</math>
 +
| <math>c_n = n^2 + n + 1</math>
 +
| [https://oeis.org/A002383 A002383]
 +
|-
 +
| <math>\quad 4. \quad</math>
 +
| <math>d_n = n^4 + 1</math>
 +
| [https://oeis.org/A000068 A000068]
 +
|-
 +
| <math>\quad 5. \quad</math>
 +
| <math>u_n = n! + 1</math>
 +
| [https://oeis.org/A002981 A002981]
 +
|-
 +
| <math>\quad 6. \quad</math>
 +
| <math>v_n = n! - 1</math>
 +
| [https://oeis.org/A002982 A002982]
 +
|-
 +
| <math>\quad 7. \quad</math>
 +
| <math>M_n = 2^n - 1</math> (liczby Mersenne'a)
 +
| [https://oeis.org/A000043 A000043]
 +
|-
 +
| <math>\quad 8. \quad</math>
 +
| <math>F_n = 2^{2^n} + 1</math> (liczby Fermata)
 +
| [https://oeis.org/A019434 A019434]
 +
|-
 +
| <math>\quad 9. \quad</math>
 +
| <math>F_n (a) = a^{2^n} + 1</math> (uogólnione liczby Fermata, <math>a</math> parzyste)
 +
| [https://mathworld.wolfram.com/GeneralizedFermatNumber.html MathWorld]
 +
|}
  
 +
Nie wiemy, czy istnieje wielomian całkowity <math>W(n)</math> stopnia większego niż jeden taki, że <math>W(n)</math> jest liczbą pierwszą dla nieskończenie wielu liczb <math>n</math>.
  
Z założenia <math>D</math> jest liczbą kwadratową modulo <math>p</math> (zobacz J23), zatem istnieje taka liczba <math>R</math>, że
 
  
::<math>D \equiv R^2 \pmod{p}</math>
 
  
Ponieważ
+
<span style="font-size: 110%; font-weight: bold;">Przykład C45</span><br/>
 +
Łatwo sprawdzić, że wartości wielomianu <math>W(n) = n^2 + n + 41</math> są liczbami pierwszymi dla <math>1 \leqslant n \leqslant 39</math>. Oczywiście <math>41 | W(41)</math>.
  
:* <math>(D \mid p) = 1</math>, to <math>p \nmid D</math>, zatem <math>p \nmid R</math>
 
:* z&nbsp;założenia <math>p \nmid Q</math>, to <math>P^2 - R^2 \equiv P^2 - D \equiv 4 Q \not\equiv 0 \pmod{p}</math>
 
  
  
Czyli
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C46</span><br/>
 +
Niech <math>a, n</math> będą liczbami całkowitymi takimi, że <math>a \geqslant 2</math> i <math>n \geqslant 1</math>. Jeżeli liczba <math>a^n + 1</math> jest liczbą pierwszą, to <math>a</math> jest liczbą parzystą i <math>n = 2^m</math>.
  
::<math>2^{p - 2} U_{p - 1} \equiv - P (P^{p - 3} + P^{p - 5} R^2 + P^{p - 7} R^4 + \ldots + R^{p - 3}) \pmod{p}</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
Gdyby liczba <math>a</math> była nieparzysta, to <math>a^n + 1 \geqslant 4</math> byłoby parzyste i&nbsp;nie mogłoby być liczbą pierwszą.
  
 +
Niech teraz wykładnik <math>n = x y</math> będzie liczbą złożoną, zaś <math>x</math> będzie liczbą nieparzystą. Wtedy
  
Uwzględniając, że <math>P^2 - R^2 \not\equiv 0 \pmod{p}</math>, możemy napisać
+
::<math>a^n + 1 = (a^y)^x + 1</math>
  
::<math>2^{p - 2} (P^2 - R^2) U_{p - 1} \equiv - P (P^2 - R^2) (P^{p - 3} + P^{p - 5} R^2 + P^{p - 7} R^4 + \ldots + R^{p - 3}) \pmod{p}</math>
+
Oznaczając <math>b = a^y</math> oraz <math>x = 2 k + 1</math> mamy
  
::::::::<math>\equiv - P (P^{p - 1} - R^{p - 1}) \pmod{p}</math>
+
::<math>a^n + 1 = (a^y)^x + 1 =</math>
  
::::::::<math>\equiv 0 \pmod{p}</math>
+
::::<math>\: = b^x + 1 =</math>
  
Zauważmy, że wynik nie zależy od tego, czy <math>p \mid P</math>, czy <math>p \nmid P</math>. Skąd wynika
+
::::<math>\: = b^{2 k + 1} + 1 =</math>
  
::<math>U_{p - 1} \equiv 0 \pmod{p}</math>
+
::::<math>\: = (b + 1) \cdot (b^{2 k} - b^{2 k - 1} + \ldots - b^3 + b^2 - b + 1)</math>
  
Co należało pokazać.<br/>
+
Wynika stąd, że w&nbsp;takim przypadku <math>a^n + 1</math> jest liczbą złożoną. Zatem wykładnik <math>n</math> nie może zawierać czynników nieparzystych, czyli musi być <math>n = 2^m</math>. Co należało pokazać.<br/>
 
&#9633;
 
&#9633;
 
{{\Spoiler}}
 
{{\Spoiler}}
Linia 904: Linia 879:
  
  
Aby zapisać punkty 2. i 3. twierdzenia L19 (i tylko te punkty) w&nbsp;zwartej formie, musimy założyć, że <math>\gcd (p, D) = 1</math>. Otrzymujemy<br/>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C47</span><br/>
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L20</span><br/>
+
Dla dowolnej liczby naturalnej <math>n \geqslant 1</math> liczba <math>x - y</math> jest dzielnikiem wyrażenia <math>x^n - y^n</math>.
Jeżeli <math>p</math> jest liczbą pierwszą nieparzystą i <math>\gcd (p, Q D) = 1</math>, to
 
  
::<math>U_{p - (D \mid p)} \equiv 0 \pmod{p}</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
Indukcja matematyczna. Twierdzenie jest prawdziwe dla <math>n = 1</math>, bo <math>x - y</math> dzieli <math>x^1 - y^1</math>. Załóżmy, że <math>x - y</math> jest dzielnikiem wyrażenia <math>x^n - y^n</math>, czyli <math>x^n - y^n = (x - y) \cdot k</math>, otrzymujemy dla <math>n + 1</math>
  
 +
::<math>x^{n + 1} - y^{n + 1} = x x^n - y x^n + y x^n - y y^n =</math>
  
 +
:::::<math>\quad \, = (x - y) x^n + y (x^n - y^n) =</math>
  
 +
:::::<math>\quad \, = (x - y) x^n + y (x - y) \cdot k =</math>
  
 +
:::::<math>\quad \, = (x - y) (x^n + y \cdot k)</math>
  
== Liczby pseudopierwsze Lucasa ==
+
Czyli <math>x - y</math> jest dzielnikiem <math>x^{n + 1} - y^{n + 1}</math>. Co kończy dowód indukcyjny.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L21</span><br/>
 
Z twierdzenia L20 wiemy, że liczby pierwsze nieparzyste <math>p</math> takie, że <math>p \nmid Q D</math> są dzielnikami wyrazów ciągu Lucasa <math>U_{p - (D \mid p)}</math>, gdzie <math>(D \mid p)</math> oznacza symbol Legendre'a. Jeśli zastąpimy symbol Legendre'a symbolem Jacobiego, to będziemy mogli badać prawdziwość tego twierdzenia dla liczb złożonych i&nbsp;łatwo przekonamy się, że dla pewnych liczb złożonych <math>m</math> kongruencja
 
  
::<math>U_{m - (D \mid m)} \equiv 0 \pmod{m}</math>
 
  
również jest prawdziwa. Prowadzi to definicji liczb pseudopierwszych Lucasa.
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C48</span><br/>
 +
Jeżeli <math>n \geqslant 2</math> oraz <math>a^n - 1</math> jest liczbą pierwszą, to <math>a = 2</math> i <math>n</math> jest liczbą pierwszą.
  
 +
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
Z twierdzenia C47 wiemy, że <math>x - y | x^n - y^n</math>. W&nbsp;przypadku gdy <math>a > 2</math> mamy
  
 +
::<math>a - 1 | a^n - 1</math>
  
<span style="font-size: 110%; font-weight: bold;">Definicja L22</span><br/>
+
Czyli musi być <math>a = 2</math>. Z&nbsp;tego samego twierdzenia wynika też, że jeżeli <math>n</math> jest liczbą złożoną <math>n = r s</math>, to
Powiemy, że liczba złożona nieparzysta <math>m</math> jest liczbą pseudopierwszą Lucasa dla parametrów <math>P</math> i <math>Q</math> (symbolicznie: LPSP( <math>P, Q</math> )), jeżeli <math>\gcd (m, Q D) = 1</math> i
 
  
::<math>U_{m - (D \mid m)} \equiv 0 \pmod{m}</math>
+
::<math>2^r - 1 | 2^{r s} - 1</math>
  
gdzie <math>(D \mid m)</math> oznacza symbol Jacobiego.
+
bo <math>a^r - b^r | (a^r)^s - (b^r)^s</math>. Zatem <math>n</math> musi być liczbą pierwszą. Co kończy dowód.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
  
  
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L23</span><br/>
 
Jeżeli liczba złożona nieparzysta <math>m</math> jest liczbą pseudopierwszą Lucasa dla parametrów <math>P = a + 1</math> i <math>Q = a</math>, gdzie <math>a \geqslant 2</math>, to jest liczbą pseudopierwszą Fermata przy podstawie <math>a</math>.
 
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 
Połóżmy we wzorze definiującym ciąg Lucasa
 
  
::<math>U_m = {\small\frac{\alpha^m - \beta^m}{\alpha - \beta}}</math>
 
  
<math>\alpha = a</math> i <math>\beta = 1</math>. Odpowiada to parametrom <math>P = \alpha + \beta = a + 1</math>, <math>Q = \alpha \beta = a</math>, <math>D = (\alpha - \beta)^2 = (a - 1)^2</math>.
+
== Ciągi arytmetyczne liczb pierwszych ==
  
Ponieważ musi być <math>\gcd (m, Q D) = 1</math>, to mamy <math>\gcd (m, (a - 1) a) = 1</math> i&nbsp;wynika stąd, że <math>(D \mid m) = 1</math>. Z&nbsp;założenia <math>m</math> jest liczbą pseudopierwszą Lucasa dla parametrów <math>P = a + 1</math> i <math>Q = a</math>, zatem
+
<span style="font-size: 110%; font-weight: bold;">Uwaga C49</span><br/>
 +
Ciągi arytmetyczne liczb pierwszych<ref name="PAPWiki"/><ref name="PAPMathWorld"/> zbudowane z&nbsp;dwóch liczb pierwszych nie są interesujące, bo dowolne dwie liczby tworzą ciąg arytmetyczny. Dlatego będziemy się zajmowali ciągami arytmetycznymi liczb pierwszych o&nbsp;długości <math>n \geqslant 3</math>.
  
::<math>U_{m - 1} (a + 1, a) \equiv 0 \pmod{m}</math>
+
Ponieważ nie da się zbudować ciągu arytmetycznego liczb pierwszych o&nbsp;długości <math>n \geqslant 3</math>, w&nbsp;którym pierwszym wyrazem jest liczba <math>p_0 = 2</math>, to będą nas interesowały ciągi rozpoczynające się od liczby pierwszej <math>p_0 \geqslant 3</math>
  
Czyli
+
Jeżeli do liczby pierwszej nieparzystej dodamy dodatnią liczbę nieparzystą, to otrzymamy liczbę parzystą złożoną, zatem różnica ciągu arytmetycznego <math>d</math> musi być liczbą parzystą, aby zbudowanie jakiegokolwiek ciągu arytmetycznego liczb pierwszych o&nbsp;długości <math>n \geqslant 3</math> było możliwe.
  
::<math>{\small\frac{a^{m - 1} - 1}{a - 1}} \equiv 0 \pmod{m}</math>
+
Istnienie nieskończenie wiele ciągów arytmetycznych liczb pierwszych o&nbsp;długości <math>n = 3</math> pokazano już wiele lat temu<ref name="Corput"/>. Temat ciągów arytmetycznych liczb pierwszych zyskał na popularności<ref name="largestPAP"/> po udowodnieniu przez Bena Greena i&nbsp;Terence'a Tao twierdzenia o&nbsp;istnieniu dowolnie długich (ale skończonych) ciągów arytmetycznych liczb pierwszych<ref name="GeenTao"/>.
  
Jeżeli <math>m \biggr\rvert {\small\frac{a^{m - 1} - 1}{a - 1}}</math>, to tym bardziej <math>m \big\rvert (a^{m - 1} - 1)</math> i&nbsp;możemy napisać
 
  
::<math>a^{m - 1} - 1 \equiv 0 \pmod{m}</math>
 
  
Zatem <math>m</math> jest liczbą pseudopierwszą Fermata przy podstawie <math>a</math>. Co należało pokazać.<br/>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C50* (Ben Green i&nbsp;Terence Tao, 2004)</span><br/>
&#9633;
+
Dla dowolnej liczby naturalnej <math>n \geqslant 2</math> istnieje nieskończenie wiele <math>n</math>-wyrazowych ciągów arytmetycznych liczb pierwszych.
{{\Spoiler}}
 
  
  
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L24</span><br/>
 
Wykorzystując funkcje <code>jacobi(a, n)</code> i <code>modLucas(n, P, Q, m)</code> (zobacz J41, L15) możemy napisać prosty program, który sprawdza, czy dla liczby nieparzystej <math>m</math> prawdziwe jest twierdzenie L20.
 
  
<span style="font-size: 90%; color:black;">isPrimeOr<span style="background-color: #fee481;">LPSP</span>(m, P, Q) =
+
<span style="font-size: 110%; font-weight: bold;">Przykład C51</span><br/>
{
+
Tabela zawiera przykładowe ciągi arytmetyczne liczb pierwszych o&nbsp;długości <math>n = 3</math> i <math>n = 4</math>.
'''local'''(D, js);
 
D = P^2 - 4*Q;
 
'''if'''( gcd(m, 2*Q*D) > 1, '''return'''(0) );
 
js = jacobi(D, m);
 
'''if'''( modLucas(m - js, P, Q, m)[1] == 0, '''return'''(1), '''return'''(0) );
 
}
 
  
 +
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż tabele|Hide=Ukryj tabele}}
 +
W przypadku <math>n = 3</math> wyszukiwanie ciągów zostało przeprowadzone dla <math>d = 2 k</math>, gdzie <math>1 \leqslant k \leqslant 100</math> i (przy ustalonym <math>d</math>) dla kolejnych liczb pierwszych <math>p_0 \leqslant 10^8</math>.
  
 +
W przypadku <math>n = 4</math> wyszukiwanie ciągów zostało przeprowadzone dla <math>d = 6 k</math>, gdzie <math>1 \leqslant k \leqslant 100</math> i (przy ustalonym <math>d</math>) dla kolejnych liczb pierwszych <math>p_0 \leqslant 10^8</math>.
  
<span style="font-size: 110%; font-weight: bold;">Przykład L25</span><br/>
+
Jeżeli w&nbsp;tabeli jest wypisanych sześć wartości <math>p_0</math>, to oznacza to, że zostało znalezionych co najmniej sześć wartości <math>p_0</math>.
Poniższa tabela zawiera najmniejsze liczby pseudopierwsze Lucasa dla różnych parametrów <math>P</math> i <math>Q</math>
 
  
::{| class="wikitable plainlinks"  style="font-size: 90%; text-align: right; margin-right: auto;"
+
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 80%; text-align: right;"
! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<math>\boldsymbol{P}</math><br/><math>\boldsymbol{Q}</math>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+
|- style="background: #98fb98; text-align: center;"
! <math>\boldsymbol{1}</math> !! <math>\boldsymbol{2}</math> !! <math>\boldsymbol{3}</math> !! <math>\boldsymbol{4}</math> !! <math>\boldsymbol{5}</math> !! <math>\boldsymbol{6}</math> !! <math>\boldsymbol{7}</math> !! <math>\boldsymbol{8}</math> !! <math>\boldsymbol{9}</math> !! <math>\boldsymbol{10}</math>  
+
| colspan=7 | <math>\mathbf{n = 3}</math>
 +
|- style="text-align: center;"
 +
| style="background: #ffd890;" | <math>\mathbf{d}</math>
 +
| colspan=6 | <math>\mathbf{p_0}</math>
 +
|-
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6}</math>||<math> 5</math>||<math> 7</math>||<math> 11</math>||<math> 17</math>||<math> 31</math>||<math> 41</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12}</math>||<math> 5</math>||<math> 7</math>||<math> 17</math>||<math> 19</math>||<math> 29</math>||<math> 47</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18}</math>||<math> 5</math>||<math> 11</math>||<math> 23</math>||<math> 43</math>||<math> 53</math>||<math> 61</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 20}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 24}</math>||<math> 5</math>||<math> 13</math>||<math> 19</math>||<math> 23</math>||<math> 59</math>||<math> 79</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 28}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 30}</math>||<math> 7</math>||<math> 11</math>||<math> 13</math>||<math> 23</math>||<math> 29</math>||<math> 37</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 34}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 36}</math>||<math> 7</math>||<math> 11</math>||<math> 17</math>||<math> 31</math>||<math> 37</math>||<math> 67</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 38}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 40}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 42}</math>||<math> 5</math>||<math> 17</math>||<math> 19</math>||<math> 29</math>||<math> 47</math>||<math> 67</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 48}</math>||<math> 5</math>||<math> 11</math>||<math> 13</math>||<math> 31</math>||<math> 41</math>||<math> 53</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 50}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 54}</math>||<math> 5</math>||<math> 19</math>||<math> 29</math>||<math> 43</math>||<math> 59</math>||<math> 73</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 60}</math>||<math> 7</math>||<math> 11</math>||<math> 19</math>||<math> 29</math>||<math> 37</math>||<math> 43</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 64}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 66}</math>||<math> 5</math>||<math> 7</math>||<math> 17</math>||<math> 31</math>||<math> 41</math>||<math> 47</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 68}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 72}</math>||<math> 7</math>||<math> 29</math>||<math> 37</math>||<math> 67</math>||<math> 79</math>||<math> 107</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 78}</math>||<math> 11</math>||<math> 23</math>||<math> 71</math>||<math> 73</math>||<math> 101</math>||<math> 113</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 80}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 84}</math>||<math> 5</math>||<math> 13</math>||<math> 23</math>||<math> 29</math>||<math> 43</math>||<math> 73</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 90}</math>||<math> 11</math>||<math> 13</math>||<math> 17</math>||<math> 19</math>||<math> 47</math>||<math> 59</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 94}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 96}</math>||<math> 5</math>||<math> 7</math>||<math> 31</math>||<math> 41</math>||<math> 71</math>||<math> 101</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 98}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 102}</math>||<math> 7</math>||<math> 29</math>||<math> 37</math>||<math> 47</math>||<math> 79</math>||<math> 89</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 104}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 108}</math>||<math> 23</math>||<math> 41</math>||<math> 131</math>||<math> 163</math>||<math> 173</math>||<math> 223</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 110}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 114}</math>||<math> 13</math>||<math> 23</math>||<math> 43</math>||<math> 53</math>||<math> 79</math>||<math> 83</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 120}</math>||<math> 11</math>||<math> 17</math>||<math> 29</math>||<math> 31</math>||<math> 37</math>||<math> 43</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 124}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 126}</math>||<math> 5</math>||<math> 11</math>||<math> 31</math>||<math> 41</math>||<math> 97</math>||<math> 101</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 132}</math>||<math> 5</math>||<math> 7</math>||<math> 17</math>||<math> 19</math>||<math> 47</math>||<math> 67</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 134}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 138}</math>||<math> 41</math>||<math> 61</math>||<math> 73</math>||<math> 103</math>||<math> 113</math>||<math> 173</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 144}</math>||<math> 5</math>||<math> 19</math>||<math> 23</math>||<math> 29</math>||<math> 79</math>||<math> 113</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 150}</math>||<math> 7</math>||<math> 13</math>||<math> 17</math>||<math> 31</math>||<math> 47</math>||<math> 73</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 154}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 156}</math>||<math> 37</math>||<math> 41</math>||<math> 67</math>||<math> 71</math>||<math> 107</math>||<math> 127</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 162}</math>||<math> 29</math>||<math> 107</math>||<math> 109</math>||<math> 197</math>||<math> 239</math>||<math> 269</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 164}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 168}</math>||<math> 11</math>||<math> 13</math>||<math> 23</math>||<math> 31</math>||<math> 43</math>||<math> 61</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 174}</math>||<math> 5</math>||<math> 19</math>||<math> 53</math>||<math> 83</math>||<math> 109</math>||<math> 139</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 178}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 180}</math>||<math> 13</math>||<math> 19</math>||<math> 59</math>||<math> 61</math>||<math> 71</math>||<math> 83</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 186}</math>||<math> 7</math>||<math> 11</math>||<math> 37</math>||<math> 47</math>||<math> 71</math>||<math> 107</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 188}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 190}</math>||<math> 3</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 192}</math>||<math> 5</math>||<math> 37</math>||<math> 47</math>||<math> 59</math>||<math> 79</math>||<math> 139</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 198}</math>||<math> 13</math>||<math> 43</math>||<math> 53</math>||<math> 71</math>||<math> 83</math>||<math> 113</math>
 +
|}
 +
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 80%; text-align: right;"
 +
|- style="background: #98fb98; text-align: center;"
 +
| colspan=7 | <math>\mathbf{n = 4}</math>
 +
|- style="text-align: center;"
 +
| style="background: #ffd890;" | <math>\mathbf{d}</math>
 +
| colspan=6 | <math>\mathbf{p_0}</math>
 +
|-
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6}</math>||<math> 5</math>||<math> 11</math>||<math> 41</math>||<math> 61</math>||<math> 251</math>||<math> 601</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12}</math>||<math> 5</math>||<math> 7</math>||<math> 17</math>||<math> 47</math>||<math> 127</math>||<math> 227</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18}</math>||<math> 5</math>||<math> 43</math>||<math> 53</math>||<math> 113</math>||<math> 313</math>||<math> 673</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 24}</math>||<math> 59</math>||<math> 79</math>||<math> 349</math>||<math> 419</math>||<math> 499</math>||<math> 569</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 30}</math>||<math> 7</math>||<math> 11</math>||<math> 13</math>||<math> 23</math>||<math> 37</math>||<math> 41</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 36}</math>||<math> 31</math>||<math> 241</math>||<math> 281</math>||<math> 311</math>||<math> 751</math>||<math> 911</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 42}</math>||<math> 5</math>||<math> 47</math>||<math> 67</math>||<math> 97</math>||<math> 107</math>||<math> 157</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 48}</math>||<math> 5</math>||<math> 13</math>||<math> 53</math>||<math> 83</math>||<math> 613</math>||<math> 643</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 54}</math>||<math> 5</math>||<math> 19</math>||<math> 29</math>||<math> 239</math>||<math> 379</math>||<math> 719</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 60}</math>||<math> 11</math>||<math> 19</math>||<math> 43</math>||<math> 47</math>||<math> 53</math>||<math> 71</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 66}</math>||<math> 31</math>||<math> 41</math>||<math> 241</math>||<math> 251</math>||<math> 521</math>||<math> 541</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 72}</math>||<math> 7</math>||<math> 67</math>||<math> 167</math>||<math> 347</math>||<math> 947</math>||<math> 1217</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 78}</math>||<math> 23</math>||<math> 73</math>||<math> 113</math>||<math> 233</math>||<math> 353</math>||<math> 443</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 84}</math>||<math> 5</math>||<math> 29</math>||<math> 149</math>||<math> 179</math>||<math> 379</math>||<math> 439</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 90}</math>||<math> 11</math>||<math> 13</math>||<math> 47</math>||<math> 61</math>||<math> 83</math>||<math> 89</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 96}</math>||<math> 5</math>||<math> 71</math>||<math> 101</math>||<math> 631</math>||<math> 761</math>||<math> 1471</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 102}</math>||<math> 7</math>||<math> 47</math>||<math> 127</math>||<math> 257</math>||<math> 337</math>||<math> 557</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 108}</math>||<math> 23</math>||<math> 163</math>||<math> 223</math>||<math> 293</math>||<math> 353</math>||<math> 643</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 114}</math>||<math> 79</math>||<math> 349</math>||<math> 569</math>||<math> 709</math>||<math> 1259</math>||<math> 2039</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 120}</math>||<math> 29</math>||<math> 37</math>||<math> 71</math>||<math> 73</math>||<math> 107</math>||<math> 149</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 126}</math>||<math> 5</math>||<math> 11</math>||<math> 31</math>||<math> 41</math>||<math> 101</math>||<math> 131</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 132}</math>||<math> 5</math>||<math> 47</math>||<math> 67</math>||<math> 257</math>||<math> 277</math>||<math> 487</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 138}</math>||<math> 73</math>||<math> 173</math>||<math> 383</math>||<math> 463</math>||<math> 563</math>||<math> 773</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 144}</math>||<math> 29</math>||<math> 509</math>||<math> 599</math>||<math> 1019</math>||<math> 1579</math>||<math> 2609</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 150}</math>||<math> 7</math>||<math> 13</math>||<math> 17</math>||<math> 73</math>||<math> 157</math>||<math> 163</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 156}</math>||<math> 41</math>||<math> 151</math>||<math> 191</math>||<math> 461</math>||<math> 571</math>||<math> 641</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 162}</math>||<math> 107</math>||<math> 197</math>||<math> 337</math>||<math> 967</math>||<math> 1297</math>||<math> 1627</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 168}</math>||<math> 43</math>||<math> 73</math>||<math> 83</math>||<math> 103</math>||<math> 113</math>||<math> 373</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 174}</math>||<math> 19</math>||<math> 109</math>||<math> 139</math>||<math> 509</math>||<math> 839</math>||<math> 929</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 180}</math>||<math> 59</math>||<math> 61</math>||<math> 101</math>||<math> 103</math>||<math> 281</math>||<math> 283</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 186}</math>||<math> 11</math>||<math> 151</math>||<math> 271</math>||<math> 281</math>||<math> 491</math>||<math> 691</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 192}</math>||<math> 37</math>||<math> 157</math>||<math> 307</math>||<math> 647</math>||<math> 1087</math>||<math> 1427</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 198}</math>||<math> 13</math>||<math> 53</math>||<math> 83</math>||<math> 263</math>||<math> 373</math>||<math> 853</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 204}</math>||<math> 79</math>||<math> 149</math>||<math> 449</math>||<math> 479</math>||<math> 569</math>||<math> 919</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 210}</math>||<math> 13</math>||<math> 23</math>||<math> 29</math>||<math> 47</math>||<math> 71</math>||<math> 103</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 216}</math>||<math> 11</math>||<math> 181</math>||<math> 761</math>||<math> 1021</math>||<math> 1061</math>||<math> 1231</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 222}</math>||<math> 17</math>||<math> 157</math>||<math> 197</math>||<math> 547</math>||<math> 617</math>||<math> 787</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 228}</math>||<math> 43</math>||<math> 263</math>||<math> 313</math>||<math> 593</math>||<math> 953</math>||<math> 1093</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 234}</math>||<math> 359</math>||<math> 499</math>||<math> 619</math>||<math> 829</math>||<math> 1549</math>||<math> 2309</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 240}</math>||<math> 23</math>||<math> 41</math>||<math> 67</math>||<math> 107</math>||<math> 139</math>||<math> 263</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 246}</math>||<math> 31</math>||<math> 71</math>||<math> 101</math>||<math> 331</math>||<math> 541</math>||<math> 661</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 252}</math>||<math> 5</math>||<math> 17</math>||<math> 97</math>||<math> 127</math>||<math> 197</math>||<math> 257</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 258}</math>||<math> 53</math>||<math> 313</math>||<math> 503</math>||<math> 1103</math>||<math> 1873</math>||<math> 3253</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 264}</math>||<math> 19</math>||<math> 29</math>||<math> 89</math>||<math> 199</math>||<math> 379</math>||<math> 409</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 270}</math>||<math> 47</math>||<math> 67</math>||<math> 229</math>||<math> 491</math>||<math> 557</math>||<math> 613</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 276}</math>||<math> 181</math>||<math> 191</math>||<math> 401</math>||<math> 601</math>||<math> 661</math>||<math> 1171</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 282}</math>||<math> 137</math>||<math> 317</math>||<math> 457</math>||<math> 1297</math>||<math> 1747</math>||<math> 1787</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 288}</math>||<math> 23</math>||<math> 43</math>||<math> 233</math>||<math> 353</math>||<math> 463</math>||<math> 743</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 294}</math>||<math> 59</math>||<math> 89</math>||<math> 139</math>||<math> 269</math>||<math> 349</math>||<math> 719</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 300}</math>||<math> 7</math>||<math> 47</math>||<math> 53</math>||<math> 83</math>||<math> 109</math>||<math> 139</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 306}</math>||<math> 491</math>||<math> 691</math>||<math> 971</math>||<math> 1321</math>||<math> 1471</math>||<math> 2341</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 312}</math>||<math> 127</math>||<math> 257</math>||<math> 347</math>||<math> 547</math>||<math> 607</math>||<math> 757</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 318}</math>||<math> 283</math>||<math> 373</math>||<math> 653</math>||<math> 1063</math>||<math> 1493</math>||<math> 1823</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 324}</math>||<math> 179</math>||<math> 349</math>||<math> 839</math>||<math> 2389</math>||<math> 2699</math>||<math> 2879</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 330}</math>||<math> 23</math>||<math> 59</math>||<math> 79</math>||<math> 101</math>||<math> 113</math>||<math> 127</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 336}</math>||<math> 11</math>||<math> 61</math>||<math> 281</math>||<math> 311</math>||<math> 421</math>||<math> 491</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 342}</math>||<math> 7</math>||<math> 67</math>||<math> 137</math>||<math> 257</math>||<math> 467</math>||<math> 887</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 348}</math>||<math> 5</math>||<math> 73</math>||<math> 563</math>||<math> 593</math>||<math> 743</math>||<math> 1373</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 354}</math>||<math> 89</math>||<math> 239</math>||<math> 389</math>||<math> 509</math>||<math> 659</math>||<math> 739</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 360}</math>||<math> 7</math>||<math> 13</math>||<math> 23</math>||<math> 37</math>||<math> 101</math>||<math> 107</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 366}</math>||<math> 461</math>||<math> 571</math>||<math> 1481</math>||<math> 1511</math>||<math> 1901</math>||<math> 2111</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 372}</math>||<math> 7</math>||<math> 547</math>||<math> 857</math>||<math> 877</math>||<math> 1087</math>||<math> 2887</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 378}</math>||<math> 53</math>||<math> 83</math>||<math> 163</math>||<math> 313</math>||<math> 503</math>||<math> 563</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 384}</math>||<math> 139</math>||<math> 229</math>||<math> 719</math>||<math> 1229</math>||<math> 1439</math>||<math> 1699</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 390}</math>||<math> 31</math>||<math> 43</math>||<math> 59</math>||<math> 131</math>||<math> 157</math>||<math> 197</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 396}</math>||<math> 5</math>||<math> 61</math>||<math> 71</math>||<math> 431</math>||<math> 691</math>||<math> 701</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 402}</math>||<math> 7</math>||<math> 17</math>||<math> 167</math>||<math> 727</math>||<math> 997</math>||<math> 1637</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 408}</math>||<math> 13</math>||<math> 223</math>||<math> 643</math>||<math> 683</math>||<math> 1063</math>||<math> 1213</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 414}</math>||<math> 269</math>||<math> 359</math>||<math> 619</math>||<math> 1039</math>||<math> 1879</math>||<math> 2089</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 420}</math>||<math> 19</math>||<math> 23</math>||<math> 37</math>||<math> 41</math>||<math> 43</math>||<math> 47</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 426}</math>||<math> 5</math>||<math> 131</math>||<math> 181</math>||<math> 431</math>||<math> 761</math>||<math> 811</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 432}</math>||<math> 227</math>||<math> 617</math>||<math> 857</math>||<math> 997</math>||<math> 1657</math>||<math> 1667</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 438}</math>||<math> 5</math>||<math> 53</math>||<math> 383</math>||<math> 1163</math>||<math> 1303</math>||<math> 1873</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 444}</math>||<math> 199</math>||<math> 409</math>||<math> 1109</math>||<math> 1669</math>||<math> 1889</math>||<math> 2029</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 450}</math>||<math> 11</math>||<math> 97</math>||<math> 149</math>||<math> 193</math>||<math> 251</math>||<math> 359</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 456}</math>||<math> 191</math>||<math> 521</math>||<math> 631</math>||<math> 1171</math>||<math> 1291</math>||<math> 2341</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 462}</math>||<math> 47</math>||<math> 107</math>||<math> 137</math>||<math> 277</math>||<math> 307</math>||<math> 367</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 468}</math>||<math> 193</math>||<math> 293</math>||<math> 503</math>||<math> 683</math>||<math> 733</math>||<math> 1013</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 474}</math>||<math> 5</math>||<math> 29</math>||<math> 379</math>||<math> 479</math>||<math> 719</math>||<math> 829</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 480}</math>||<math> 7</math>||<math> 11</math>||<math> 127</math>||<math> 347</math>||<math> 439</math>||<math> 449</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 486}</math>||<math> 241</math>||<math> 811</math>||<math> 941</math>||<math> 1361</math>||<math> 1861</math>||<math> 1871</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 492}</math>||<math> 7</math>||<math> 107</math>||<math> 947</math>||<math> 1607</math>||<math> 2897</math>||<math> 3037</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 498}</math>||<math> 73</math>||<math> 883</math>||<math> 953</math>||<math> 983</math>||<math> 1723</math>||<math> 1913</math>
 
|-
 
|-
! <math>\boldsymbol{- 5}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 504}</math>||<math> 89</math>||<math> 109</math>||<math> 229</math>||<math> 359</math>||<math> 599</math>||<math> 619</math>
| <math>253</math> || <math>121</math> || <math>57</math> || <math>217</math> || style="background-color: yellow" | <math>323</math> || <math>69</math> || <math>121</math> || <math>253</math> || <math>9</math> || style="background-color: yellow" | <math>143</math>  
 
 
|-
 
|-
! <math>\boldsymbol{- 4}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 510}</math>||<math> 13</math>||<math> 67</math>||<math> 83</math>||<math> 89</math>||<math> 97</math>||<math> 167</math>
| <math>9</math> || style="background-color: yellow" | <math>323</math> || <math>91</math> || style="background-color: yellow" | <math>35</math> || style="background-color: yellow" | <math>15</math> || style="background-color: yellow" | <math>119</math> || <math>57</math> || <math>9</math> || <math>9</math> || <math>9</math>  
 
 
|-
 
|-
! <math>\boldsymbol{- 3}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 516}</math>||<math> 31</math>||<math> 61</math>||<math> 71</math>||<math> 1181</math>||<math> 1361</math>||<math> 1471</math>
| <math>217</math> || <math>91</math> || style="background-color: yellow" | <math>527</math> || <math>25</math> || style="background-color: yellow" | <math>35</math> || style="background-color: yellow" | <math>65</math> || style="background-color: yellow" | <math>35</math> || style="background-color: yellow" | <math>35</math> || style="background-color: yellow" | <math>35</math> || style="background-color: yellow" | <math>323</math>  
 
 
|-
 
|-
! <math>\boldsymbol{- 2}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 522}</math>||<math> 47</math>||<math> 487</math>||<math> 907</math>||<math> 1097</math>||<math> 1237</math>||<math> 1747</math>
| <math>341</math> || style="background-color: yellow" | <math>209</math> || style="background-color: yellow" | <math>39</math> || <math>49</math> || <math>49</math> || style="background-color: yellow" | <math>15</math> || style="background-color: yellow" | <math>35</math> || style="background-color: yellow" | <math>35</math> || <math>9</math> || <math>85</math>  
 
 
|-
 
|-
! <math>\boldsymbol{- 1}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 528}</math>||<math> 13</math>||<math> 73</math>||<math> 443</math>||<math> 503</math>||<math> 653</math>||<math> 1213</math>
| style="background-color: yellow" | <math>323</math> || style="background-color: yellow" | <math>35</math> || style="background-color: yellow" | <math>119</math> || <math>9</math> || <math>9</math> || style="background-color: yellow" | <math>143</math> || <math>25</math> || <math>33</math> || <math>9</math> || style="background-color: yellow" | <math>15</math>  
 
 
|-
 
|-
! <math>\boldsymbol{1}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 534}</math>||<math> 839</math>||<math> 919</math>||<math> 1019</math>||<math> 1399</math>||<math> 1579</math>||<math> 1619</math>
| <math>25</math> || style="background-color: red" | <math></math> || <math>21</math> || style="background-color: yellow" | <math>65</math> || style="background-color: yellow" | <math>115</math> || style="background-color: yellow" | <math>35</math> || style="background-color: yellow" | <math>323</math> || style="background-color: yellow" | <math>209</math> || <math>9</math> || style="background-color: yellow" | <math>35</math>
 
 
|-
 
|-
! <math>\boldsymbol{2}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 540}</math>||<math> 7</math>||<math> 17</math>||<math> 37</math>||<math> 73</math>||<math> 101</math>||<math> 113</math>
| <math>1541</math> || <math>9</math> || <math>341</math> || style="background-color: yellow" | <math>35</math> || <math>21</math> || <math>85</math> || <math>9</math> || style="background-color: yellow" | <math>15</math> || <math>9</math> || style="background-color: yellow" | <math>35</math>  
 
 
|-
 
|-
! <math>\boldsymbol{3}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 546}</math>||<math> 31</math>||<math> 61</math>||<math> 71</math>||<math> 401</math>||<math> 431</math>||<math> 821</math>
| style="background-color: yellow" | <math>629</math> || style="background-color: yellow" | <math>559</math> || <math>25</math> || <math>91</math> || <math>49</math> || <math>49</math> || style="background-color: yellow" | <math>35</math> || <math>55</math> || <math>25</math> || style="background-color: yellow" | <math>35</math>  
 
 
|-
 
|-
! <math>\boldsymbol{4}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 552}</math>||<math> 67</math>||<math> 257</math>||<math> 277</math>||<math> 727</math>||<math> 1427</math>||<math> 2267</math>
| style="background-color: yellow" | <math>119</math> || <math>25</math> || style="background-color: yellow" | <math>209</math> || style="background-color: red" | <math></math> || <math>85</math> || <math>21</math> || style="background-color: yellow" | <math>119</math> || style="background-color: yellow" | <math>65</math> || <math>9</math> || style="background-color: yellow" | <math>115</math>  
 
 
|-
 
|-
! <math>\boldsymbol{5}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 558}</math>||<math> 463</math>||<math> 593</math>||<math> 673</math>||<math> 1013</math>||<math> 1583</math>||<math> 2243</math>
| <math>9</math> || style="background-color: yellow" | <math>143</math> || <math>49</math> || style="background-color: yellow" | <math>143</math> || style="background-color: yellow" | <math>323</math> || <math>217</math> || style="background-color: yellow" | <math>39</math> || <math>9</math> || <math>9</math> || <math>9</math>  
+
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 564}</math>||<math> 109</math>||<math> 179</math>||<math> 659</math>||<math> 719</math>||<math> 859</math>||<math> 1429</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 570}</math>||<math> 23</math>||<math> 31</math>||<math> 73</math>||<math> 157</math>||<math> 163</math>||<math> 241</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 576}</math>||<math> 151</math>||<math> 401</math>||<math> 541</math>||<math> 991</math>||<math> 1061</math>||<math> 1091</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 582}</math>||<math> 37</math>||<math> 127</math>||<math> 457</math>||<math> 647</math>||<math> 967</math>||<math> 1087</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 588}</math>||<math> 103</math>||<math> 113</math>||<math> 223</math>||<math> 233</math>||<math> 443</math>||<math> 613</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 594}</math>||<math> 5</math>||<math> 89</math>||<math> 439</math>||<math> 599</math>||<math> 839</math>||<math> 1019</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 600}</math>||<math> 31</math>||<math> 101</math>||<math> 173</math>||<math> 227</math>||<math> 229</math>||<math> 239</math>
 
|}
 
|}
 
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż kod|Hide=Ukryj kod}}
 
<span style="font-size: 90%; color:black;">FirstLPSP(Stop) =
 
\\ najmniejsze LPSP(P,Q) < Stop;  dla 1<=P<=10 i -5<=Q<=5
 
{
 
'''local'''(D, m, P, Q);
 
Q = -6;
 
'''while'''( Q++ <= 5,
 
        '''if'''( Q == 0, '''next'''() );
 
        P = 0;
 
        '''while'''( P++ <= 10,
 
              D = P^2 - 4*Q;
 
              '''if'''( D == 0,
 
                  '''print'''("Q= ", Q, "  P= ", P, "  ------------------");
 
                  '''next'''();
 
                );
 
              m = 3;
 
              '''while'''( m < Stop,
 
                      '''if'''( isPrimeOr<span style="background-color: #fee481;">LPSP</span>(m, P, Q)  &&  !'''isprime'''(m),
 
                          '''print'''("Q= ", Q, "  P= ", P, "  m= ", m, "  (D|m)= ", jacobi(D, m));
 
                          '''break'''();
 
                        );
 
                      m = m + 2;
 
                    );
 
            );
 
      );
 
}</span>
 
 
<br/>
 
<br/>
 +
&#9633;
 
{{\Spoiler}}
 
{{\Spoiler}}
  
Żółtym tłem oznaczyliśmy te najmniejsze liczby pseudopierwsze Lucasa, dla których <math>(D \mid m) = - 1</math>.
 
  
  
 +
<span style="font-size: 110%; font-weight: bold;">Przykład C52</span><br/>
 +
Tabela zawiera przykładowe ciągi arytmetyczne liczb pierwszych o&nbsp;długości <math>n = 5</math> i <math>n = 6</math>.
  
<span style="font-size: 110%; font-weight: bold;">Przykład L26</span><br/>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż tabele|Hide=Ukryj tabele}}
Ilość liczb LPSP(<math>P, Q</math>) mniejszych od <math>10^9</math>
+
W przypadku <math>n = 5</math> wyszukiwanie ciągów zostało przeprowadzone dla <math>d = 6 k</math>, gdzie <math>1 \leqslant k \leqslant 100</math> i (przy ustalonym <math>d</math>) dla kolejnych liczb pierwszych <math>p_0 \leqslant 10^8</math>.
  
::{| class="wikitable plainlinks"  style="font-size: 90%; text-align: right; margin-right: auto;"
+
W przypadku <math>n = 6</math> wyszukiwanie ciągów zostało przeprowadzone dla <math>d = 30 k</math>, gdzie <math>1 \leqslant k \leqslant 100</math> i (przy ustalonym <math>d</math>) dla kolejnych liczb pierwszych <math>p_0 \leqslant 10^8</math>.
! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<math>\boldsymbol{P}</math><br/><math>\boldsymbol{Q}</math>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+
 
! <math>\boldsymbol{1}</math> !! <math>\boldsymbol{2}</math> !! <math>\boldsymbol{3}</math> !! <math>\boldsymbol{4}</math> !! <math>\boldsymbol{5}</math> !! <math>\boldsymbol{6}</math> !! <math>\boldsymbol{7}</math> !! <math>\boldsymbol{8}</math> !! <math>\boldsymbol{9}</math> !! <math>\boldsymbol{10}</math>  
+
Jeżeli w&nbsp;tabeli jest wypisanych sześć wartości <math>p_0</math>, to oznacza to, że zostało znalezionych co najmniej sześć wartości <math>p_0</math>.
 +
 
 +
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 80%; text-align: right;"
 +
|- style="background: #98fb98; text-align: center;"
 +
| colspan=7 | <math>\mathbf{n = 5}</math>
 +
|- style="text-align: center;"
 +
| style="background: #ffd890;" | <math>\mathbf{d}</math>
 +
| colspan=6 | <math>\mathbf{p_0}</math>
 +
|-
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6}</math>||<math> 5</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12}</math>||<math> 5</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 30}</math>||<math> 7</math>||<math> 11</math>||<math> 37</math>||<math> 107</math>||<math> 137</math>||<math> 151</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 42}</math>||<math> 5</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 48}</math>||<math> 5</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 60}</math>||<math> 11</math>||<math> 43</math>||<math> 53</math>||<math> 71</math>||<math> 113</math>||<math> 571</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 90}</math>||<math> 13</math>||<math> 61</math>||<math> 83</math>||<math> 89</math>||<math> 103</math>||<math> 503</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 96}</math>||<math> 5</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 120}</math>||<math> 29</math>||<math> 107</math>||<math> 239</math>||<math> 281</math>||<math> 359</math>||<math> 379</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 126}</math>||<math> 5</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 150}</math>||<math> 7</math>||<math> 13</math>||<math> 17</math>||<math> 73</math>||<math> 157</math>||<math> 223</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 180}</math>||<math> 101</math>||<math> 103</math>||<math> 367</math>||<math> 397</math>||<math> 577</math>||<math> 1013</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 210}</math>||<math> 13</math>||<math> 23</math>||<math> 47</math>||<math> 71</math>||<math> 127</math>||<math> 157</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 240}</math>||<math> 23</math>||<math> 263</math>||<math> 331</math>||<math> 571</math>||<math> 823</math>||<math> 947</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 252}</math>||<math> 5</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 270}</math>||<math> 491</math>||<math> 557</math>||<math> 613</math>||<math> 641</math>||<math> 743</math>||<math> 827</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 300}</math>||<math> 83</math>||<math> 223</math>||<math> 383</math>||<math> 419</math>||<math> 509</math>||<math> 523</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 330}</math>||<math> 79</math>||<math> 113</math>||<math> 127</math>||<math> 317</math>||<math> 457</math>||<math> 491</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 360}</math>||<math> 7</math>||<math> 13</math>||<math> 227</math>||<math> 293</math>||<math> 349</math>||<math> 577</math>
 
|-
 
|-
! <math>\boldsymbol{- 5}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 390}</math>||<math> 59</math>||<math> 229</math>||<math> 311</math>||<math> 619</math>||<math> 1097</math>||<math> 1489</math>
| <math>4266</math> || <math>4935</math> || <math>4278</math> || <math>4981</math> || <math>6363</math> || <math>6028</math> || <math>5202</math> || <math>4426</math> || <math>5832</math> || <math>6027</math>  
 
 
|-
 
|-
! <math>\boldsymbol{- 4}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 420}</math>||<math> 19</math>||<math> 41</math>||<math> 43</math>||<math> 67</math>||<math> 193</math>||<math> 199</math>
| <math>4599</math> || <math>4152</math> || <math>9272</math> || <math>5886</math> || <math>6958</math> || <math>4563</math> || <math>5600</math> || <math>9509</math> || <math>7007</math> || <math>4142</math>  
 
 
|-
 
|-
! <math>\boldsymbol{- 3}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 426}</math>||<math> 5</math>||||||||||
| <math>4265</math> || <math>5767</math> || <math>4241</math> || <math>5114</math> || <math>5859</math> || <math>7669</math> || <math>6083</math> || <math>6120</math> || <math>4420</math> || <math>5096</math>
 
 
|-
 
|-
! <math>\boldsymbol{- 2}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 450}</math>||<math> 11</math>||<math> 149</math>||<math> 193</math>||<math> 599</math>||<math> 1033</math>||<math> 1117</math>
| <math>5361</math> || <math>4389</math> || <math>5063</math> || <math>5632</math> || <math>5364</math> || <math>5228</math> || <math>5859</math> || <math>10487</math> || <math>5370</math> || <math>9798</math>  
 
 
|-
 
|-
! <math>\boldsymbol{- 1}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 474}</math>||<math> 5</math>||||||||||
| <math>4152</math> || <math>5886</math> || <math>4563</math> || <math>9509</math> || <math>4142</math> || <math>6273</math> || <math>5773</math> || <math>4497</math> || <math>5166</math> || <math>5305</math>
 
 
|-
 
|-
! <math>\boldsymbol{1}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 480}</math>||<math> 11</math>||<math> 347</math>||<math> 491</math>||<math> 1019</math>||<math> 1103</math>||<math> 1723</math>
| <math>282485800</math> || style="background-color: red" | <math></math> || <math>6567</math> || <math>7669</math> || <math>7131</math> || <math>10882</math> || <math>8626</math> || <math>8974</math> || <math>8509</math> || <math>8752</math>  
 
 
|-
 
|-
! <math>\boldsymbol{2}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 510}</math>||<math> 13</math>||<math> 89</math>||<math> 97</math>||<math> 167</math>||<math> 229</math>||<math> 419</math>
| <math>7803</math> || <math>449152466</math> || <math>5597</math> || <math>5886</math> || <math>6509</math> || <math>5761</math> || <math>8115</math> || <math>6945</math> || <math>8380</math> || <math>7095</math>  
 
 
|-
 
|-
! <math>\boldsymbol{3}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 540}</math>||<math> 113</math>||<math> 211</math>||<math> 281</math>||<math> 379</math>||<math> 673</math>||<math> 919</math>
| <math>5974</math> || <math>8768</math> || <math>282485800</math> || <math>5767</math> || <math>5651</math> || <math>5632</math> || <math>6640</math> || <math>5725</math> || <math>6058</math> || <math>7050</math>  
 
 
|-
 
|-
! <math>\boldsymbol{4}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 570}</math>||<math> 31</math>||<math> 157</math>||<math> 241</math>||<math> 269</math>||<math> 647</math>||<math> 839</math>
| <math>10749</math> || <math>282485800</math> || <math>14425</math> || style="background-color: red" | <math></math> || <math>9735</math> || <math>6567</math> || <math>8164</math> || <math>7669</math> || <math>7608</math> || <math>7131</math>  
 
 
|-
 
|-
! <math>\boldsymbol{5}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 594}</math>||<math> 5</math>||||||||||
| <math>5047</math> || <math>15127</math> || <math>6155</math> || <math>15127</math> || <math>4152</math> || <math>5146</math> || <math>4423</math> || <math>5526</math> || <math>6289</math> || <math>9509</math>  
+
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 600}</math>||<math> 283</math>||<math> 311</math>||<math> 353</math>||<math> 509</math>||<math> 1223</math>||<math> 1531</math>
 +
|}
 +
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 80%; text-align: right;"
 +
|- style="background: #98fb98; text-align: center;"
 +
| colspan=7 | <math>\mathbf{n = 6}</math>
 +
|- style="text-align: center;"
 +
| style="background: #ffd890;" | <math>\mathbf{d}</math>
 +
| colspan=6 | <math>\mathbf{p_0}</math>
 +
|-
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 30}</math>||<math> 7</math>||<math> 107</math>||<math> 359</math>||<math> 541</math>||<math> 2221</math>||<math> 6673</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 60}</math>||<math> 11</math>||<math> 53</math>||<math> 641</math>||<math> 5443</math>||<math> 10091</math>||<math> 12457</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 90}</math>||<math> 13</math>||<math> 503</math>||<math> 1973</math>||<math> 2351</math>||<math> 5081</math>||<math> 10709</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 120}</math>||<math> 239</math>||<math> 281</math>||<math> 701</math>||<math> 2339</math>||<math> 2437</math>||<math> 10613</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 150}</math>||<math> 7</math>||<math> 73</math>||<math> 157</math>||<math> 2467</math>||<math> 4637</math>||<math> 6079</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 180}</math>||<math> 397</math>||<math> 1013</math>||<math> 1307</math>||<math> 17029</math>||<math> 20963</math>||<math> 24337</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 210}</math>||<math> 13</math>||<math> 47</math>||<math> 179</math>||<math> 199</math>||<math> 257</math>||<math> 389</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 240}</math>||<math> 23</math>||<math> 331</math>||<math> 2207</math>||<math> 3677</math>||<math> 5021</math>||<math> 6323</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 270}</math>||<math> 557</math>||<math> 1201</math>||<math> 2377</math>||<math> 8467</math>||<math> 9923</math>||<math> 12107</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 300}</math>||<math> 83</math>||<math> 223</math>||<math> 587</math>||<math> 1511</math>||<math> 4073</math>||<math> 4423</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 330}</math>||<math> 127</math>||<math> 491</math>||<math> 2129</math>||<math> 2857</math>||<math> 3137</math>||<math> 5153</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 360}</math>||<math> 227</math>||<math> 577</math>||<math> 1669</math>||<math> 9187</math>||<math> 13331</math>||<math> 13933</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 390}</math>||<math> 229</math>||<math> 3701</math>||<math> 9007</math>||<math> 9833</math>||<math> 13291</math>||<math> 17911</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 420}</math>||<math> 41</math>||<math> 43</math>||<math> 193</math>||<math> 613</math>||<math> 743</math>||<math> 1289</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 450}</math>||<math> 149</math>||<math> 1381</math>||<math> 1451</math>||<math> 3607</math>||<math> 5651</math>||<math> 8521</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 480}</math>||<math> 11</math>||<math> 5051</math>||<math> 8719</math>||<math> 10567</math>||<math> 11113</math>||<math> 13591</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 510}</math>||<math> 97</math>||<math> 419</math>||<math> 811</math>||<math> 3191</math>||<math> 3583</math>||<math> 4283</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 540}</math>||<math> 379</math>||<math> 673</math>||<math> 3851</math>||<math> 3907</math>||<math> 7043</math>||<math> 12377</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 570}</math>||<math> 269</math>||<math> 1039</math>||<math> 2887</math>||<math> 3853</math>||<math> 10979</math>||<math> 11399</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 600}</math>||<math> 8839</math>||<math> 23371</math>||<math> 38183</math>||<math> 44189</math>||<math> 59743</math>||<math> 63467</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 630}</math>||<math> 179</math>||<math> 193</math>||<math> 1637</math>||<math> 2267</math>||<math> 2897</math>||<math> 4813</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 660}</math>||<math> 163</math>||<math> 317</math>||<math> 401</math>||<math> 2753</math>||<math> 3229</math>||<math> 5077</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 690}</math>||<math> 277</math>||<math> 1523</math>||<math> 6101</math>||<math> 10427</math>||<math> 15971</math>||<math> 27059</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 720}</math>||<math> 1231</math>||<math> 3793</math>||<math> 4003</math>||<math> 6229</math>||<math> 7573</math>||<math> 10079</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 750}</math>||<math> 1051</math>||<math> 1289</math>||<math> 1583</math>||<math> 2857</math>||<math> 12377</math>||<math> 18523</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 780}</math>||<math> 1151</math>||<math> 3517</math>||<math> 3923</math>||<math> 4637</math>||<math> 5309</math>||<math> 9929</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 810}</math>||<math> 1993</math>||<math> 7817</math>||<math> 11443</math>||<math> 17519</math>||<math> 52631</math>||<math> 109919</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 840}</math>||<math> 97</math>||<math> 313</math>||<math> 1061</math>||<math> 1753</math>||<math> 1901</math>||<math> 2593</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 870}</math>||<math> 2039</math>||<math> 2179</math>||<math> 5273</math>||<math> 5987</math>||<math> 9431</math>||<math> 10957</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 900}</math>||<math> 1747</math>||<math> 12541</math>||<math> 14767</math>||<math> 21193</math>||<math> 31511</math>||<math> 40289</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 930}</math>||<math> 7</math>||<math> 293</math>||<math> 9043</math>||<math> 10247</math>||<math> 34327</math>||<math> 38891</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 960}</math>||<math> 4943</math>||<math> 8737</math>||<math> 15373</math>||<math> 28351</math>||<math> 35393</math>||<math> 36919</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 990}</math>||<math> 1249</math>||<math> 1319</math>||<math> 2467</math>||<math> 2957</math>||<math> 4049</math>||<math> 8291</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1020}</math>||<math> 887</math>||<math> 929</math>||<math> 2441</math>||<math> 4639</math>||<math> 15083</math>||<math> 19997</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1050}</math>||<math> 53</math>||<math> 257</math>||<math> 443</math>||<math> 839</math>||<math> 1103</math>||<math> 3469</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1080}</math>||<math> 1423</math>||<math> 9011</math>||<math> 10663</math>||<math> 27799</math>||<math> 36493</math>||<math> 51473</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1110}</math>||<math> 3847</math>||<math> 9643</math>||<math> 10357</math>||<math> 11743</math>||<math> 16223</math>||<math> 21977</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1140}</math>||<math> 1063</math>||<math> 1301</math>||<math> 1553</math>||<math> 1777</math>||<math> 5683</math>||<math> 6397</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1170}</math>||<math> 379</math>||<math> 701</math>||<math> 911</math>||<math> 2143</math>||<math> 2297</math>||<math> 2857</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1200}</math>||<math> 367</math>||<math> 2677</math>||<math> 3391</math>||<math> 18749</math>||<math> 34961</math>||<math> 59699</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1230}</math>||<math> 2539</math>||<math> 6053</math>||<math> 6823</math>||<math> 9091</math>||<math> 12101</math>||<math> 14831</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1260}</math>||<math> 359</math>||<math> 617</math>||<math> 739</math>||<math> 1051</math>||<math> 1619</math>||<math> 1931</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1290}</math>||<math> 149</math>||<math> 17747</math>||<math> 20981</math>||<math> 24481</math>||<math> 46643</math>||<math> 47917</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1320}</math>||<math> 53</math>||<math> 977</math>||<math> 991</math>||<math> 2237</math>||<math> 9461</math>||<math> 20983</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1350}</math>||<math> 811</math>||<math> 937</math>||<math> 3877</math>||<math> 14923</math>||<math> 16001</math>||<math> 18493</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1380}</math>||<math> 3613</math>||<math> 9227</math>||<math> 15541</math>||<math> 16927</math>||<math> 17417</math>||<math> 18089</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1410}</math>||<math> 367</math>||<math> 2593</math>||<math> 12421</math>||<math> 50599</math>||<math> 60889</math>||<math> 80629</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1440}</math>||<math> 439</math>||<math> 6277</math>||<math> 20753</math>||<math> 21929</math>||<math> 39079</math>||<math> 57727</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1470}</math>||<math> 1279</math>||<math> 1877</math>||<math> 2383</math>||<math> 2393</math>||<math> 2749</math>||<math> 2801</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1500}</math>||<math> 7331</math>||<math> 8423</math>||<math> 15493</math>||<math> 28513</math>||<math> 31607</math>||<math> 38453</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1530}</math>||<math> 2741</math>||<math> 3203</math>||<math> 8537</math>||<math> 14389</math>||<math> 20143</math>||<math> 21277</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1560}</math>||<math> 419</math>||<math> 727</math>||<math> 3499</math>||<math> 3919</math>||<math> 6257</math>||<math> 9029</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1590}</math>||<math> 2213</math>||<math> 2339</math>||<math> 4523</math>||<math> 6469</math>||<math> 9241</math>||<math> 9857</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1620}</math>||<math> 7717</math>||<math> 9103</math>||<math> 12379</math>||<math> 37607</math>||<math> 43613</math>||<math> 46567</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1650}</math>||<math> 19</math>||<math> 3001</math>||<math> 3659</math>||<math> 4051</math>||<math> 4289</math>||<math> 11527</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1680}</math>||<math> 197</math>||<math> 997</math>||<math> 1289</math>||<math> 1319</math>||<math> 2309</math>||<math> 2683</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1710}</math>||<math> 373</math>||<math> 1549</math>||<math> 1913</math>||<math> 2711</math>||<math> 12539</math>||<math> 15031</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1740}</math>||<math> 1621</math>||<math> 5387</math>||<math> 6269</math>||<math> 15551</math>||<math> 61723</math>||<math> 77543</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1770}</math>||<math> 1483</math>||<math> 13691</math>||<math> 15329</math>||<math> 20873</math>||<math> 23869</math>||<math> 29917</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1800}</math>||<math> 421</math>||<math> 967</math>||<math> 1499</math>||<math> 6217</math>||<math> 30983</math>||<math> 37171</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1830}</math>||<math> 31</math>||<math> 17909</math>||<math> 46567</math>||<math> 89057</math>||<math> 105619</math>||<math> 128341</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1860}</math>||<math> 5087</math>||<math> 6151</math>||<math> 9133</math>||<math> 16567</math>||<math> 23819</math>||<math> 29881</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1890}</math>||<math> 23</math>||<math> 727</math>||<math> 1109</math>||<math> 1279</math>||<math> 1409</math>||<math> 1543</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1920}</math>||<math> 79</math>||<math> 1493</math>||<math> 13967</math>||<math> 19973</math>||<math> 41351</math>||<math> 46867</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1950}</math>||<math> 3259</math>||<math> 4813</math>||<math> 8803</math>||<math> 12373</math>||<math> 13577</math>||<math> 13619</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1980}</math>||<math> 1511</math>||<math> 3863</math>||<math> 4969</math>||<math> 5039</math>||<math> 7027</math>||<math> 9337</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2010}</math>||<math> 1303</math>||<math> 3739</math>||<math> 7309</math>||<math> 13763</math>||<math> 22093</math>||<math> 31151</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2040}</math>||<math> 1039</math>||<math> 6779</math>||<math> 7507</math>||<math> 8963</math>||<math> 10069</math>||<math> 12281</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2070}</math>||<math> 1097</math>||<math> 2063</math>||<math> 2917</math>||<math> 4289</math>||<math> 6571</math>||<math> 11149</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2100}</math>||<math> 29</math>||<math> 281</math>||<math> 757</math>||<math> 1459</math>||<math> 1847</math>||<math> 2503</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2130}</math>||<math> 3677</math>||<math> 5077</math>||<math> 11699</math>||<math> 17159</math>||<math> 21149</math>||<math> 31159</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2160}</math>||<math> 5849</math>||<math> 6619</math>||<math> 24329</math>||<math> 43019</math>||<math> 114419</math>||<math> 126823</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2190}</math>||<math> 643</math>||<math> 4283</math>||<math> 4339</math>||<math> 23743</math>||<math> 24821</math>||<math> 30211</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2220}</math>||<math> 4229</math>||<math> 11243</math>||<math> 11467</math>||<math> 12503</math>||<math> 13693</math>||<math> 26209</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2250}</math>||<math> 4721</math>||<math> 6359</math>||<math> 17321</math>||<math> 19477</math>||<math> 21661</math>||<math> 23117</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2280}</math>||<math> 719</math>||<math> 2399</math>||<math> 15797</math>||<math> 22391</math>||<math> 23189</math>||<math> 27809</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2310}</math>||<math> 37</math>||<math> 71</math>||<math> 83</math>||<math> 547</math>||<math> 661</math>||<math> 859</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2340}</math>||<math> 107</math>||<math> 4363</math>||<math> 5483</math>||<math> 9613</math>||<math> 12413</math>||<math> 14737</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2370}</math>||<math> 1187</math>||<math> 1831</math>||<math> 4211</math>||<math> 7963</math>||<math> 9419</math>||<math> 15607</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2400}</math>||<math> 503</math>||<math> 853</math>||<math> 4787</math>||<math> 15091</math>||<math> 20327</math>||<math> 23603</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2430}</math>||<math> 13217</math>||<math> 31039</math>||<math> 38851</math>||<math> 43261</math>||<math> 46747</math>||<math> 67481</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2460}</math>||<math> 227</math>||<math> 1459</math>||<math> 6779</math>||<math> 6863</math>||<math> 18553</math>||<math> 29207</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2490}</math>||<math> 1237</math>||<math> 7621</math>||<math> 14411</math>||<math> 19801</math>||<math> 46457</math>||<math> 55921</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2520}</math>||<math> 113</math>||<math> 709</math>||<math> 1013</math>||<math> 1181</math>||<math> 1303</math>||<math> 1409</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2550}</math>||<math> 1871</math>||<math> 9403</math>||<math> 33203</math>||<math> 36241</math>||<math> 70009</math>||<math> 74587</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2580}</math>||<math> 277</math>||<math> 6101</math>||<math> 29383</math>||<math> 35851</math>||<math> 55871</math>||<math> 61723</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2610}</math>||<math> 5179</math>||<math> 8539</math>||<math> 8861</math>||<math> 10093</math>||<math> 15679</math>||<math> 17989</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2640}</math>||<math> 9283</math>||<math> 10781</math>||<math> 12377</math>||<math> 12433</math>||<math> 13679</math>||<math> 22751</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2670}</math>||<math> 1039</math>||<math> 4133</math>||<math> 12589</math>||<math> 14731</math>||<math> 16411</math>||<math> 23789</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2700}</math>||<math> 8629</math>||<math> 10267</math>||<math> 16217</math>||<math> 17477</math>||<math> 18149</math>||<math> 19843</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2730}</math>||<math> 19</math>||<math> 631</math>||<math> 761</math>||<math> 811</math>||<math> 1091</math>||<math> 1423</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2760}</math>||<math> 7</math>||<math> 2473</math>||<math> 2767</math>||<math> 9137</math>||<math> 9403</math>||<math> 9767</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2790}</math>||<math> 6899</math>||<math> 15733</math>||<math> 20353</math>||<math> 20899</math>||<math> 23447</math>||<math> 29201</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2820}</math>||<math> 727</math>||<math> 1259</math>||<math> 3023</math>||<math> 7951</math>||<math> 17989</math>||<math> 20201</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2850}</math>||<math> 379</math>||<math> 463</math>||<math> 2843</math>||<math> 4831</math>||<math> 9661</math>||<math> 10067</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2880}</math>||<math> 1459</math>||<math> 2803</math>||<math> 4973</math>||<math> 7283</math>||<math> 8543</math>||<math> 12281</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2910}</math>||<math> 397</math>||<math> 12409</math>||<math> 19087</math>||<math> 25121</math>||<math> 37441</math>||<math> 41081</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2940}</math>||<math> 17</math>||<math> 383</math>||<math> 691</math>||<math> 983</math>||<math> 2393</math>||<math> 2797</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2970}</math>||<math> 1031</math>||<math> 2879</math>||<math> 3593</math>||<math> 5147</math>||<math> 6029</math>||<math> 6673</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3000}</math>||<math> 907</math>||<math> 35543</math>||<math> 45413</math>||<math> 60337</math>||<math> 65713</math>||<math> 89009</math>
 
|}
 
|}
 
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż kod|Hide=Ukryj kod}}
 
<span style="font-size: 90%; color:black;">NumOfLPSP(Stop) =
 
\\ ilość liczb pseudopierwszych Lucasa LPSP(P,Q) < Stop;  dla 1<=P<=10 i -5<=Q<=5
 
{
 
'''local'''(D, m, P, Q);
 
Q = -6;
 
'''while'''( Q++ <= 5,
 
        '''if'''( Q == 0, '''next'''() );
 
        P = 0;
 
        '''while'''( P++ <= 10,
 
              D = P^2 - 4*Q;
 
              '''if'''( D == 0, '''print'''("Q= ", Q, "  P= ", P, "  ------------------"); '''next'''() );
 
              s = 0;
 
              m = 3;
 
              '''while'''( m < Stop,
 
                      '''if'''( isPrimeOr<span style="background-color: #fee481;">LPSP</span>(m, P, Q)  &&  !'''isprime'''(m), s++ );
 
                      m = m + 2;
 
                    );
 
              '''print'''("Q= ", Q, "  P= ", P, "  s= ", s);
 
            );
 
      );
 
}</span>
 
 
<br/>
 
<br/>
 +
&#9633;
 
{{\Spoiler}}
 
{{\Spoiler}}
  
  
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L27</span><br/>
+
<span style="font-size: 110%; font-weight: bold;">Przykład C53</span><br/>
Dla <math>(P, Q) = (1, 1)</math> ciąg Lucasa <math>(U_n)</math> ma postać
+
Tabela zawiera przykładowe ciągi arytmetyczne liczb pierwszych o&nbsp;długości <math>n = 7</math> i <math>n = 8</math>.
  
::<math>(U_n) = (0, 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, - 1, 0, 1, 1, 0, - 1, - 1, 0, 1, 1, \ldots)</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż tabele|Hide=Ukryj tabele}}
 +
W przypadku <math>n = 7</math> wyszukiwanie ciągów zostało przeprowadzone dla <math>d = 30 k</math>, gdzie <math>1 \leqslant k \leqslant 100</math> i (przy ustalonym <math>d</math>) dla kolejnych liczb pierwszych <math>p_0 \leqslant 10^8</math>.
  
Stosując indukcję matematyczną, udowodnimy, że <math>U_{3 k} = 0</math>. Łatwo sprawdzamy, że dla <math>k = 0</math> i <math>k = 1</math> wzór jest prawdziwy. Zakładając prawdziwość wzoru dla wszystkich liczb naturalnych nie większych od <math>k</math>, otrzymujemy dla <math>k + 1</math> (zobacz L13 p.3)
+
W przypadku <math>n = 8</math> wyszukiwanie ciągów zostało przeprowadzone dla <math>d = 210 k</math>, gdzie <math>1 \leqslant k \leqslant 100</math> i (przy ustalonym <math>d</math>) dla kolejnych liczb pierwszych <math>p_0 \leqslant 10^8</math>.
  
::<math>U_{3 (k + 1)} = U_{3 k + 3} = U_{3 k} V_3 - U_{3 (k - 1)} = 0</math>
+
Jeżeli w&nbsp;tabeli jest wypisanych sześć wartości <math>p_0</math>, to oznacza to, że zostało znalezionych co najmniej sześć wartości <math>p_0</math>.
  
Co kończy dowód. Zbadajmy liczby pseudopierwsze Lucasa dla <math>(P, Q) = (1, 1)</math>.
+
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 80%; text-align: right;"
 +
|- style="background: #98fb98; text-align: center;"
 +
| colspan=7 | <math>\mathbf{n = 7}</math>
 +
|- style="text-align: center;"
 +
| style="background: #ffd890;" | <math>\mathbf{d}</math>
 +
| colspan=6 | <math>\mathbf{p_0}</math>
 +
|-
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 150}</math>||<math> 7</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 210}</math>||<math> 47</math>||<math> 179</math>||<math> 199</math>||<math> 409</math>||<math> 619</math>||<math> 829</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 420}</math>||<math> 193</math>||<math> 1619</math>||<math> 2239</math>||<math> 2659</math>||<math> 4259</math>||<math> 5849</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 630}</math>||<math> 1637</math>||<math> 2267</math>||<math> 5569</math>||<math> 8369</math>||<math> 11003</math>||<math> 11633</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 840}</math>||<math> 1061</math>||<math> 1753</math>||<math> 3623</math>||<math> 4493</math>||<math> 5651</math>||<math> 6043</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1050}</math>||<math> 53</math>||<math> 3469</math>||<math> 6653</math>||<math> 8629</math>||<math> 8783</math>||<math> 8837</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1260}</math>||<math> 359</math>||<math> 1931</math>||<math> 2063</math>||<math> 3323</math>||<math> 4583</math>||<math> 13933</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1470}</math>||<math> 1279</math>||<math> 2393</math>||<math> 2801</math>||<math> 8117</math>||<math> 8191</math>||<math> 9661</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1680}</math>||<math> 1289</math>||<math> 1319</math>||<math> 2683</math>||<math> 2969</math>||<math> 11261</math>||<math> 12941</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1890}</math>||<math> 1279</math>||<math> 1723</math>||<math> 1811</math>||<math> 1879</math>||<math> 2693</math>||<math> 4583</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2100}</math>||<math> 1847</math>||<math> 3947</math>||<math> 26497</math>||<math> 34913</math>||<math> 35771</math>||<math> 36187</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2310}</math>||<math> 71</math>||<math> 547</math>||<math> 1019</math>||<math> 1063</math>||<math> 1367</math>||<math> 1747</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2520}</math>||<math> 113</math>||<math> 1181</math>||<math> 1409</math>||<math> 5413</math>||<math> 7109</math>||<math> 7933</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2730}</math>||<math> 631</math>||<math> 811</math>||<math> 1091</math>||<math> 2417</math>||<math> 3643</math>||<math> 3821</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2760}</math>||<math> 7</math>||||||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2940}</math>||<math> 17</math>||<math> 6317</math>||<math> 6911</math>||<math> 9433</math>||<math> 11927</math>||<math> 12373</math>
 +
|}
 +
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 80%; text-align: right;"
 +
|- style="background: #98fb98; text-align: center;"
 +
| colspan=7 | <math>\mathbf{n = 8}</math>
 +
|- style="text-align: center;"
 +
| style="background: #ffd890;" | <math>\mathbf{d}</math>
 +
| colspan=6 | <math>\mathbf{p_0}</math>
 +
|-
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 210}</math>||<math> 199</math>||<math> 409</math>||<math> 619</math>||<math> 881</math>||<math> 3499</math>||<math> 3709</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 420}</math>||<math> 2239</math>||<math> 10243</math>||<math> 18493</math>||<math> 29297</math>||<math> 39199</math>||<math> 40343</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 630}</math>||<math> 1637</math>||<math> 11003</math>||<math> 38693</math>||<math> 53161</math>||<math> 56477</math>||<math> 198971</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 840}</math>||<math> 6043</math>||<math> 6883</math>||<math> 10861</math>||<math> 11701</math>||<math> 84521</math>||<math> 103837</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1050}</math>||<math> 8837</math>||<math> 41507</math>||<math> 246289</math>||<math> 302273</math>||<math> 382727</math>||<math> 499679</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1260}</math>||<math> 2063</math>||<math> 3323</math>||<math> 87511</math>||<math> 145949</math>||<math> 208099</math>||<math> 213247</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1470}</math>||<math> 8191</math>||<math> 15289</math>||<math> 101027</math>||<math> 102497</math>||<math> 187931</math>||<math> 227399</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1680}</math>||<math> 1289</math>||<math> 11261</math>||<math> 31333</math>||<math> 33013</math>||<math> 133919</math>||<math> 193283</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1890}</math>||<math> 2693</math>||<math> 15493</math>||<math> 15607</math>||<math> 17497</math>||<math> 45767</math>||<math> 47657</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2100}</math>||<math> 1847</math>||<math> 34913</math>||<math> 37013</math>||<math> 39113</math>||<math> 83311</math>||<math> 102871</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2310}</math>||<math> 1019</math>||<math> 3823</math>||<math> 5557</math>||<math> 6133</math>||<math> 7853</math>||<math> 9941</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2520}</math>||<math> 5413</math>||<math> 7109</math>||<math> 19141</math>||<math> 21661</math>||<math> 23509</math>||<math> 24763</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2730}</math>||<math> 1091</math>||<math> 4721</math>||<math> 7451</math>||<math> 22079</math>||<math> 49339</math>||<math> 53759</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2940}</math>||<math> 9433</math>||<math> 11927</math>||<math> 14867</math>||<math> 50587</math>||<math> 80933</math>||<math> 127207</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3150}</math>||<math> 433</math>||<math> 3583</math>||<math> 7877</math>||<math> 24677</math>||<math> 27827</math>||<math> 49031</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3360}</math>||<math> 6571</math>||<math> 9041</math>||<math> 39791</math>||<math> 210391</math>||<math> 213751</math>||<math> 217111</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3570}</math>||<math> 8971</math>||<math> 10429</math>||<math> 27737</math>||<math> 28387</math>||<math> 37313</math>||<math> 57047</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3780}</math>||<math> 45767</math>||<math> 82037</math>||<math> 155569</math>||<math> 473513</math>||<math> 477293</math>||<math> 511873</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3990}</math>||<math> 1699</math>||<math> 2909</math>||<math> 5689</math>||<math> 25033</math>||<math> 29873</math>||<math> 40559</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4200}</math>||<math> 12547</math>||<math> 16747</math>||<math> 37013</math>||<math> 57139</math>||<math> 89899</math>||<math> 94099</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4410}</math>||<math> 20809</math>||<math> 87623</math>||<math> 142271</math>||<math> 262733</math>||<math> 267143</math>||<math> 439009</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4620}</math>||<math> 103</math>||<math> 1531</math>||<math> 3083</math>||<math> 3257</math>||<math> 6427</math>||<math> 9461</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4830}</math>||<math> 3907</math>||<math> 13313</math>||<math> 30427</math>||<math> 35257</math>||<math> 40087</math>||<math> 72547</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5040}</math>||<math> 13477</math>||<math> 14951</math>||<math> 25073</math>||<math> 25931</math>||<math> 30113</math>||<math> 57457</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5250}</math>||<math> 3413</math>||<math> 8663</math>||<math> 44179</math>||<math> 49429</math>||<math> 111109</math>||<math> 648107</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5460}</math>||<math> 1559</math>||<math> 18899</math>||<math> 36389</math>||<math> 43711</math>||<math> 59393</math>||<math> 75541</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5670}</math>||<math> 187477</math>||<math> 231109</math>||<math> 402137</math>||<math> 680123</math>||<math> 706463</math>||<math> 712133</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5880}</math>||<math> 73</math>||<math> 29959</math>||<math> 152389</math>||<math> 158269</math>||<math> 317021</math>||<math> 2115961</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6090}</math>||<math> 12239</math>||<math> 22469</math>||<math> 38543</math>||<math> 50893</math>||<math> 72533</math>||<math> 90863</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6300}</math>||<math> 37097</math>||<math> 86869</math>||<math> 92639</math>||<math> 224633</math>||<math> 440269</math>||<math> 641327</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6510}</math>||<math> 1063</math>||<math> 20599</math>||<math> 21701</math>||<math> 27109</math>||<math> 41611</math>||<math> 46187</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6720}</math>||<math> 3167</math>||<math> 7457</math>||<math> 22669</math>||<math> 62347</math>||<math> 69067</math>||<math> 75787</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6930}</math>||<math> 17</math>||<math> 5581</math>||<math> 6947</math>||<math> 7151</math>||<math> 13469</math>||<math> 14081</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7140}</math>||<math> 3347</math>||<math> 53309</math>||<math> 281557</math>||<math> 370879</math>||<math> 380447</math>||<math> 466897</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7350}</math>||<math> 206047</math>||<math> 348163</math>||<math> 363037</math>||<math> 435661</math>||<math> 576677</math>||<math> 906107</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7560}</math>||<math> 29387</math>||<math> 36947</math>||<math> 39191</math>||<math> 44267</math>||<math> 342389</math>||<math> 349949</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7770}</math>||<math> 6553</math>||<math> 14323</math>||<math> 25169</math>||<math> 28549</math>||<math> 36319</math>||<math> 42061</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7980}</math>||<math> 137</math>||<math> 4091</math>||<math> 7237</math>||<math> 8117</math>||<math> 12071</math>||<math> 24029</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8190}</math>||<math> 3593</math>||<math> 21017</math>||<math> 35591</math>||<math> 43781</math>||<math> 49727</math>||<math> 59021</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8400}</math>||<math> 86599</math>||<math> 173909</math>||<math> 788413</math>||<math> 1251869</math>||<math> 1365019</math>||<math> 1392731</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8610}</math>||<math> 541</math>||<math> 1867</math>||<math> 63703</math>||<math> 132283</math>||<math> 140893</math>||<math> 175837</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8820}</math>||<math> 9403</math>||<math> 83563</math>||<math> 84421</math>||<math> 93241</math>||<math> 187823</math>||<math> 296983</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9030}</math>||<math> 11087</math>||<math> 195203</math>||<math> 219799</math>||<math> 352813</math>||<math> 426973</math>||<math> 487651</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9240}</math>||<math> 199</math>||<math> 937</math>||<math> 10177</math>||<math> 21031</math>||<math> 27961</math>||<math> 30271</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9450}</math>||<math> 1609</math>||<math> 157181</math>||<math> 182867</math>||<math> 663049</math>||<math> 1028479</math>||<math> 1037929</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9660}</math>||<math> 521</math>||<math> 3449</math>||<math> 10181</math>||<math> 50417</math>||<math> 84229</math>||<math> 218363</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9870}</math>||<math> 61</math>||<math> 43013</math>||<math> 89923</math>||<math> 220333</math>||<math> 294479</math>||<math> 490493</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10080}</math>||<math> 6949</math>||<math> 17029</math>||<math> 54293</math>||<math> 99023</math>||<math> 125353</math>||<math> 125899</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10290}</math>||<math> 6143</math>||<math> 16433</math>||<math> 179057</math>||<math> 211777</math>||<math> 681949</math>||<math> 1018357</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10500}</math>||<math> 9109</math>||<math> 91153</math>||<math> 218527</math>||<math> 447817</math>||<math> 513167</math>||<math> 1113239</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10710}</math>||<math> 9419</math>||<math> 28603</math>||<math> 28871</math>||<math> 37861</math>||<math> 43691</math>||<math> 75041</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10920}</math>||<math> 14657</math>||<math> 21491</math>||<math> 52321</math>||<math> 63241</math>||<math> 79997</math>||<math> 80621</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11130}</math>||<math> 49681</math>||<math> 70607</math>||<math> 187009</math>||<math> 198139</math>||<math> 209269</math>||<math> 219613</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11340}</math>||<math> 24197</math>||<math> 57143</math>||<math> 68483</math>||<math> 158617</math>||<math> 212297</math>||<math> 237257</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11550}</math>||<math> 4483</math>||<math> 4673</math>||<math> 9619</math>||<math> 16223</math>||<math> 21169</math>||<math> 66161</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11760}</math>||<math> 3511</math>||<math> 241793</math>||<math> 469613</math>||<math> 517949</math>||<math> 548263</math>||<math> 643469</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11970}</math>||<math> 6221</math>||<math> 10531</math>||<math> 22501</math>||<math> 40343</math>||<math> 216233</math>||<math> 280187</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12180}</math>||<math> 18211</math>||<math> 65437</math>||<math> 126943</math>||<math> 137239</math>||<math> 149939</math>||<math> 361213</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12390}</math>||<math> 7477</math>||<math> 24391</math>||<math> 41669</math>||<math> 76913</math>||<math> 95213</math>||<math> 181211</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12600}</math>||<math> 26003</math>||<math> 435577</math>||<math> 448177</math>||<math> 558431</math>||<math> 571031</math>||<math> 583631</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12810}</math>||<math> 19289</math>||<math> 35437</math>||<math> 40949</math>||<math> 53791</math>||<math> 59357</math>||<math> 94309</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13020}</math>||<math> 15913</math>||<math> 55843</math>||<math> 77773</math>||<math> 179519</math>||<math> 418927</math>||<math> 670853</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13230}</math>||<math> 5843</math>||<math> 7433</math>||<math> 9391</math>||<math> 31729</math>||<math> 40543</math>||<math> 53773</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13440}</math>||<math> 2141</math>||<math> 15581</math>||<math> 270143</math>||<math> 335021</math>||<math> 405269</math>||<math> 448741</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13650}</math>||<math> 3343</math>||<math> 12097</math>||<math> 16993</math>||<math> 19259</math>||<math> 63611</math>||<math> 81001</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13860}</math>||<math> 6029</math>||<math> 6211</math>||<math> 26171</math>||<math> 27653</math>||<math> 32441</math>||<math> 51839</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14070}</math>||<math> 40879</math>||<math> 87793</math>||<math> 87991</math>||<math> 159491</math>||<math> 285497</math>||<math> 485389</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14280}</math>||<math> 6947</math>||<math> 15923</math>||<math> 27337</math>||<math> 79481</math>||<math> 111227</math>||<math> 364687</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14490}</math>||<math> 41039</math>||<math> 48491</math>||<math> 142049</math>||<math> 144667</math>||<math> 159157</math>||<math> 161263</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14700}</math>||<math> 12409</math>||<math> 36583</math>||<math> 51283</math>||<math> 161363</math>||<math> 218989</math>||<math> 578267</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14910}</math>||<math> 23957</math>||<math> 74161</math>||<math> 79633</math>||<math> 89071</math>||<math> 109367</math>||<math> 120977</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15120}</math>||<math> 33997</math>||<math> 121853</math>||<math> 136973</math>||<math> 203429</math>||<math> 330413</math>||<math> 379369</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15330}</math>||<math> 12781</math>||<math> 64613</math>||<math> 505559</math>||<math> 588529</math>||<math> 614071</math>||<math> 873121</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15540}</math>||<math> 15053</math>||<math> 33071</math>||<math> 41131</math>||<math> 160781</math>||<math> 176321</math>||<math> 209357</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15750}</math>||<math> 7001</math>||<math> 10459</math>||<math> 64579</math>||<math> 80329</math>||<math> 103409</math>||<math> 119159</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15960}</math>||<math> 1847</math>||<math> 6037</math>||<math> 17807</math>||<math> 21997</math>||<math> 33767</math>||<math> 71917</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 16170}</math>||<math> 32321</math>||<math> 66179</math>||<math> 82349</math>||<math> 99661</math>||<math> 130343</math>||<math> 219451</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 16380}</math>||<math> 22859</math>||<math> 28579</math>||<math> 43759</math>||<math> 43913</math>||<math> 60139</math>||<math> 95107</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 16590}</math>||<math> 6703</math>||<math> 23293</math>||<math> 29009</math>||<math> 45599</math>||<math> 51341</math>||<math> 57917</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 16800}</math>||<math> 91463</math>||<math> 276037</math>||<math> 524857</math>||<math> 874063</math>||<math> 940319</math>||<math> 957119</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17010}</math>||<math> 6571</math>||<math> 70529</math>||<math> 117037</math>||<math> 227147</math>||<math> 797119</math>||<math> 814129</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17220}</math>||<math> 120713</math>||<math> 225769</math>||<math> 242989</math>||<math> 343601</math>||<math> 819229</math>||<math> 965711</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17430}</math>||<math> 4219</math>||<math> 6101</math>||<math> 15643</math>||<math> 25471</math>||<math> 33073</math>||<math> 42901</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17640}</math>||<math> 12917</math>||<math> 34877</math>||<math> 59407</math>||<math> 62047</math>||<math> 85667</math>||<math> 193607</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17850}</math>||<math> 9803</math>||<math> 129379</math>||<math> 147229</math>||<math> 238229</math>||<math> 270157</math>||<math> 289253</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18060}</math>||<math> 87613</math>||<math> 90583</math>||<math> 117223</math>||<math> 512671</math>||<math> 574297</math>||<math> 623353</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18270}</math>||<math> 29567</math>||<math> 47837</math>||<math> 86491</math>||<math> 268189</math>||<math> 424819</math>||<math> 511201</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18480}</math>||<math> 1861</math>||<math> 2711</math>||<math> 8093</math>||<math> 10831</math>||<math> 11161</math>||<math> 11909</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18690}</math>||<math> 881</math>||<math> 19571</math>||<math> 79531</math>||<math> 529829</math>||<math> 654767</math>||<math> 812353</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18900}</math>||<math> 6899</math>||<math> 23201</math>||<math> 52267</math>||<math> 73823</math>||<math> 92723</math>||<math> 462079</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19110}</math>||<math> 8941</math>||<math> 30091</math>||<math> 39367</math>||<math> 58603</math>||<math> 63737</math>||<math> 80611</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19320}</math>||<math> 6857</math>||<math> 218761</math>||<math> 236699</math>||<math> 237733</math>||<math> 300319</math>||<math> 300499</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19530}</math>||<math> 33829</math>||<math> 46183</math>||<math> 50929</math>||<math> 70459</math>||<math> 283859</math>||<math> 361651</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19740}</math>||<math> 1117</math>||<math> 2729</math>||<math> 22469</math>||<math> 30757</math>||<math> 50497</math>||<math> 165391</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19950}</math>||<math> 13339</math>||<math> 23767</math>||<math> 44549</math>||<math> 47791</math>||<math> 92399</math>||<math> 142699</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 20160}</math>||<math> 2857</math>||<math> 5821</math>||<math> 147089</math>||<math> 948263</math>||<math> 1044859</math>||<math> 1094123</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 20370}</math>||<math> 81649</math>||<math> 154073</math>||<math> 164239</math>||<math> 398539</math>||<math> 443881</math>||<math> 556123</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 20580}</math>||<math> 9689</math>||<math> 30269</math>||<math> 105379</math>||<math> 316501</math>||<math> 337081</math>||<math> 398023</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 20790}</math>||<math> 12713</math>||<math> 20023</math>||<math> 33503</math>||<math> 40813</math>||<math> 69829</math>||<math> 92251</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 21000}</math>||<math> 5501</math>||<math> 19471</math>||<math> 26501</math>||<math> 29153</math>||<math> 40471</math>||<math> 56773</math>
 +
|}
 +
<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
Mamy <math>D = P^2 - 4 Q = - 3</math>. Wynika stąd, że nie może być <math>3 \mid m</math>, bo mielibyśmy <math>\gcd (m, Q D) = 3 > 1</math>.
 
  
Z zadania J39 wiemy, że
 
  
::<math>(- 3 \mid m) =
+
<span style="font-size: 110%; font-weight: bold;">Przykład C54</span><br/>
\begin{cases}
+
Tabela zawiera przykładowe ciągi arytmetyczne liczb pierwszych o&nbsp;długości <math>n = 9</math> i <math>n = 10</math>.
\;\;\: 1 & \text{gdy } m = 6 k + 1 \\
 
\;\;\: 0 & \text{gdy } m = 6 k + 3 \\
 
      - 1 & \text{gdy } m = 6 k + 5
 
\end{cases}</math>
 
  
Ponieważ <math>3 \nmid m</math>, to wystarczy zbadać przypadki <math>m = 6 k + 1</math> i <math>m = 6 k + 5</math>. W&nbsp;pierwszym przypadku jest
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż tabele|Hide=Ukryj tabele}}
 +
W przypadku <math>n = 9</math> wyszukiwanie ciągów zostało przeprowadzone dla <math>d = 210 k</math>, gdzie <math>1 \leqslant k \leqslant 100</math> i (przy ustalonym <math>d</math>) dla kolejnych liczb pierwszych <math>p_0 \leqslant 10^9</math>.
  
::<math>U_{m - (- 3 \mid m)} = U_{6 k + 1 - 1} = U_{6 k} = 0</math>
+
W przypadku <math>n = 10</math> wyszukiwanie ciągów zostało przeprowadzone dla <math>d = 210 k</math>, gdzie <math>1 \leqslant k \leqslant 100</math> i (przy ustalonym <math>d</math>) dla kolejnych liczb pierwszych <math>p_0 \leqslant 10^{10}</math>.
  
W drugim przypadku, gdy <math>m = 6 k + 5</math>, dostajemy
+
Jeżeli w&nbsp;tabeli jest wypisanych sześć wartości <math>p_0</math>, to oznacza to, że zostało znalezionych co najmniej sześć wartości <math>p_0</math>.
  
::<math>U_{m - (- 3 \mid m)} = U_{6 k + 5 + 1} = U_{6 (k + 1)} = 0</math>
+
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 80%; text-align: right;"
 
+
|- style="background: #98fb98; text-align: center;"
Zatem dla dowolnej liczby nieparzystej <math>m</math> niepodzielnej przez <math>3</math> jest
+
| colspan=7 | <math>\mathbf{n = 9}</math>
 
+
|- style="text-align: center;"
::<math>U_{m - (- 3 \mid m)} \equiv 0 \pmod{m}</math>
+
| style="background: #ffd890;" | <math>\mathbf{d}</math>
 
+
| colspan=6 | <math>\mathbf{p_0}</math>
Czyli liczbami pseudopierwszymi Lucasa dla parametrów <math>(P, Q) = (1, 1)</math> będą liczby nieparzyste <math>m</math>, które nie są podzielne przez <math>3</math> i&nbsp;nie są liczbami pierwszymi. Ilość takich liczb nie większych od <math>10^k</math> możemy łatwo znaleźć poleceniem
+
|-
 
+
|-
'''for'''(k = 1, 9, s = 0; '''forstep'''(m = 3, 10^k, 2, '''if'''( m%6 <> 3, s = s + !'''isprime'''(m) )); '''print'''(s))
+
| style="background:#ffd890;"|<math>\mathbf{ 210}</math>||<math> 199</math>||<math> 409</math>||<math> 3499</math>||<math> 10859</math>||<math> 564973</math>||<math> 1288607</math>
 
+
|-
 
+
| style="background:#ffd890;"|<math>\mathbf{ 420}</math>||<math> 52879</math>||<math> 53299</math>||<math> 56267</math>||<math> 61637</math>||<math> 3212849</math>||<math> 3544939</math>
 
+
|-
<span style="font-size: 110%; font-weight: bold;">Zadanie L28</span><br/>
+
| style="background:#ffd890;"|<math>\mathbf{ 630}</math>||<math> 279857</math>||<math> 514949</math>||<math> 939359</math>||<math> 964417</math>||<math> 965047</math>||<math> 1003819</math>
Pokazać, że ilość liczb pseudopierwszych Lucasa dla parametrów <math>(P, Q) = (2, 2)</math> nie większych od <math>10^k</math> możemy znaleźć poleceniem
+
|-
 
+
| style="background:#ffd890;"|<math>\mathbf{ 840}</math>||<math> 6043</math>||<math> 10861</math>||<math> 103837</math>||<math> 201781</math>||<math> 915611</math>||<math> 916451</math>
'''for'''(k = 1, 9, s = 0; '''forstep'''(m = 3, 10^k, 2, s = s + !'''isprime'''(m)); '''print'''(s))
+
|-
 
+
| style="background:#ffd890;"|<math>\mathbf{ 1050}</math>||<math> 26052251</math>||<math> 33267943</math>||<math> 54730813</math>||<math> 87640921</math>||<math> 112704443</math>||<math> 115677517</math>
 
+
|-
 
+
| style="background:#ffd890;"|<math>\mathbf{ 1260}</math>||<math> 2063</math>||<math> 1040089</math>||<math> 2166511</math>||<math> 2202547</math>||<math> 4152847</math>||<math> 4400639</math>
 
+
|-
 
+
| style="background:#ffd890;"|<math>\mathbf{ 1470}</math>||<math> 101027</math>||<math> 363949</math>||<math> 1936289</math>||<math> 2534561</math>||<math> 2536031</math>||<math> 3248197</math>
== Metoda Selfridge'a wyboru parametrów <math>P</math> i <math>Q</math> ==
+
|-
 
+
| style="background:#ffd890;"|<math>\mathbf{ 1680}</math>||<math> 31333</math>||<math> 216947</math>||<math> 258527</math>||<math> 316621</math>||<math> 607109</math>||<math> 4635361</math>
<span style="font-size: 110%; font-weight: bold;">Uwaga L29</span><br/>
+
|-
Twierdzenie L20 możemy wykorzystać do testowania pierwszości liczb. Ponieważ musi być spełniony warunek <math>\gcd (m, Q D) = 1</math>, to nie każda para liczb <math>P, Q</math> (np. wybrana losowo) nadaje się do przeprowadzenia testu. Zawsze będziemy zmuszeni określić zasadę postępowania, która doprowadzi do wyboru właściwej pary <math>P, Q</math>.
+
| style="background:#ffd890;"|<math>\mathbf{ 1890}</math>||<math> 15607</math>||<math> 45767</math>||<math> 194113</math>||<math> 534211</math>||<math> 997201</math>||<math> 1442173</math>
 
+
|-
Robert Baillie i&nbsp;Samuel Wagstaff przedstawili<ref name="BaillieWagstaff1"/> dwie metody wyboru parametrów dla testu Lucasa. Ograniczymy się do omówienia tylko pierwszej z&nbsp;nich (metodę zaproponował John Selfridge).
+
| style="background:#ffd890;"|<math>\mathbf{ 2100}</math>||<math> 34913</math>||<math> 37013</math>||<math> 102871</math>||<math> 176087</math>||<math> 581393</math>||<math> 583493</math>
 
+
|-
Rozważmy ciąg <math>a_k = (- 1)^k (2 k + 1)</math>, gdzie <math>k \geqslant 2</math>, czyli <math>a_k = (5, - 7, 9, - 11, 13, - 15, \ldots)</math>. Niech <math>D</math> będzie pierwszym wyrazem ciągu <math>(a_k)</math>, dla którego jest <math>(a_k \mid m) = - 1</math>. Dla tak ustalonego <math>D</math> przyjmujemy <math>P = 1</math> i <math>Q = (1 - D) / 4</math>.
+
| style="background:#ffd890;"|<math>\mathbf{ 2310}</math>||<math> 3823</math>||<math> 60317</math>||<math> 80761</math>||<math> 563117</math>||<math> 574813</math>||<math> 1215583</math>
 
+
|-
Tabela przedstawia początkowe wartości <math>Q</math>, jakie otrzymamy, stosując tę metodę.
+
| style="background:#ffd890;"|<math>\mathbf{ 2520}</math>||<math> 19141</math>||<math> 23509</math>||<math> 1058597</math>||<math> 1061117</math>||<math> 1465993</math>||<math> 5650097</math>
 
+
|-
::{| class="wikitable plainlinks"  style="font-size: 90%; text-align: right; margin-right: auto;"
+
| style="background:#ffd890;"|<math>\mathbf{ 2730}</math>||<math> 4721</math>||<math> 65881</math>||<math> 122069</math>||<math> 123059</math>||<math> 124799</math>||<math> 125789</math>
! <math>\boldsymbol{k}</math>  
+
|-
| <math>2</math> || <math>3</math> || <math>4</math> || <math>5</math> || <math>6</math> || <math>7</math> || <math>8</math> || <math>9</math> || <math>10</math> || <math>11</math> || <math>12</math> || <math>13</math> || <math>14</math> || <math>15</math> || <math>16</math> || <math>17</math> || <math>18</math> || <math>19</math> || <math>20</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 2940}</math>||<math> 11927</math>||<math> 145723</math>||<math> 1222279</math>||<math> 12424921</math>||<math> 23527081</math>||<math> 33820273</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3150}</math>||<math> 433</math>||<math> 24677</math>||<math> 49031</math>||<math> 348763</math>||<math> 1243393</math>||<math> 1640071</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3360}</math>||<math> 210391</math>||<math> 213751</math>||<math> 245173</math>||<math> 1863509</math>||<math> 3831437</math>||<math> 6470249</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3570}</math>||<math> 57047</math>||<math> 133271</math>||<math> 150343</math>||<math> 153913</math>||<math> 399433</math>||<math> 920827</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3780}</math>||<math> 473513</math>||<math> 1282607</math>||<math> 3536881</math>||<math> 4045763</math>||<math> 4049543</math>||<math> 5655283</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3990}</math>||<math> 1699</math>||<math> 99877</math>||<math> 103867</math>||<math> 649217</math>||<math> 1614973</math>||<math> 2732441</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4200}</math>||<math> 12547</math>||<math> 89899</math>||<math> 835721</math>||<math> 2544221</math>||<math> 5013919</math>||<math> 11254637</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4410}</math>||<math> 262733</math>||<math> 439009</math>||<math> 12940541</math>||<math> 15091459</math>||<math> 27878321</math>||<math> 29196199</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4620}</math>||<math> 55697</math>||<math> 64919</math>||<math> 85363</math>||<math> 89983</math>||<math> 217409</math>||<math> 372751</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4830}</math>||<math> 30427</math>||<math> 35257</math>||<math> 72547</math>||<math> 351749</math>||<math> 2985809</math>||<math> 6020477</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5040}</math>||<math> 25073</math>||<math> 57457</math>||<math> 531359</math>||<math> 1245479</math>||<math> 2491381</math>||<math> 7136659</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5250}</math>||<math> 3413</math>||<math> 44179</math>||<math> 2117239</math>||<math> 2122489</math>||<math> 2649067</math>||<math> 4895993</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5460}</math>||<math> 144779</math>||<math> 913921</math>||<math> 1280987</math>||<math> 2243491</math>||<math> 2283571</math>||<math> 2289031</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5670}</math>||<math> 706463</math>||<math> 915221</math>||<math> 10882211</math>||<math> 21206993</math>||<math> 21212663</math>||<math> 23859467</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5880}</math>||<math> 152389</math>||<math> 4896887</math>||<math> 6559873</math>||<math> 9131321</math>||<math> 19210043</math>||<math> 24248461</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6090}</math>||<math> 206191</math>||<math> 357661</math>||<math> 517003</math>||<math> 1910927</math>||<math> 5835283</math>||<math> 10292729</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6300}</math>||<math> 641327</math>||<math> 1962449</math>||<math> 2797723</math>||<math> 3626881</math>||<math> 4663249</math>||<math> 5601139</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6510}</math>||<math> 20599</math>||<math> 155461</math>||<math> 161971</math>||<math> 573437</math>||<math> 4395739</math>||<math> 6457669</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6720}</math>||<math> 62347</math>||<math> 69067</math>||<math> 5072869</math>||<math> 9545051</math>||<math> 10379081</math>||<math> 11184743</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6930}</math>||<math> 17</math>||<math> 7151</math>||<math> 13469</math>||<math> 36469</math>||<math> 38261</math>||<math> 309167</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7140}</math>||<math> 1241197</math>||<math> 1247479</math>||<math> 2614559</math>||<math> 4496813</math>||<math> 4575947</math>||<math> 7799837</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7350}</math>||<math> 1445303</math>||<math> 8526533</math>||<math> 12683299</math>||<math> 12690649</math>||<math> 21459209</math>||<math> 21466559</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7560}</math>||<math> 29387</math>||<math> 342389</math>||<math> 539839</math>||<math> 2141497</math>||<math> 7573327</math>||<math> 7580887</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7770}</math>||<math> 6553</math>||<math> 28549</math>||<math> 36319</math>||<math> 90373</math>||<math> 819317</math>||<math> 827087</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7980}</math>||<math> 137</math>||<math> 4091</math>||<math> 24029</math>||<math> 31393</math>||<math> 165313</math>||<math> 182687</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8190}</math>||<math> 35591</math>||<math> 59021</math>||<math> 287629</math>||<math> 401627</math>||<math> 410257</math>||<math> 702323</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8400}</math>||<math> 6127909</math>||<math> 8133469</math>||<math> 8528483</math>||<math> 8536883</math>||<math> 14448397</math>||<math> 19175929</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8610}</math>||<math> 132283</math>||<math> 2164387</math>||<math> 6903121</math>||<math> 10892747</math>||<math> 10901357</math>||<math> 17489623</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8820}</math>||<math> 84421</math>||<math> 466451</math>||<math> 3052177</math>||<math> 3905777</math>||<math> 11397371</math>||<math> 53189407</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9030}</math>||<math> 2630153</math>||<math> 4927921</math>||<math> 5686141</math>||<math> 6043399</math>||<math> 8411567</math>||<math> 8510357</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9240}</math>||<math> 937</math>||<math> 21031</math>||<math> 53681</math>||<math> 62921</math>||<math> 95339</math>||<math> 495791</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9450}</math>||<math> 1028479</math>||<math> 1832711</math>||<math> 8104549</math>||<math> 15802459</math>||<math> 43975031</math>||<math> 97126691</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9660}</math>||<math> 521</math>||<math> 464413</math>||<math> 707071</math>||<math> 716731</math>||<math> 1197121</math>||<math> 1259053</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9870}</math>||<math> 576439</math>||<math> 1115923</math>||<math> 7516427</math>||<math> 9249301</math>||<math> 16561691</math>||<math> 16571561</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10080}</math>||<math> 6949</math>||<math> 125353</math>||<math> 156941</math>||<math> 949517</math>||<math> 3363089</math>||<math> 3373169</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10290}</math>||<math> 6143</math>||<math> 1535489</math>||<math> 2477177</math>||<math> 4259887</math>||<math> 5294563</math>||<math> 10818191</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10500}</math>||<math> 1113239</math>||<math> 1841087</math>||<math> 7005059</math>||<math> 8026327</math>||<math> 13707959</math>||<math> 22837799</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10710}</math>||<math> 314299</math>||<math> 439123</math>||<math> 735467</math>||<math> 1784911</math>||<math> 1923049</math>||<math> 2781203</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10920}</math>||<math> 52321</math>||<math> 285521</math>||<math> 527909</math>||<math> 538829</math>||<math> 1673941</math>||<math> 2214349</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11130}</math>||<math> 187009</math>||<math> 198139</math>||<math> 255803</math>||<math> 547499</math>||<math> 2160253</math>||<math> 11518723</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11340}</math>||<math> 57143</math>||<math> 559051</math>||<math> 1091561</math>||<math> 10756139</math>||<math> 13865323</math>||<math> 13876663</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11550}</math>||<math> 4673</math>||<math> 9619</math>||<math> 89659</math>||<math> 112643</math>||<math> 155317</math>||<math> 166601</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11760}</math>||<math> 3458731</math>||<math> 5759843</math>||<math> 6305939</math>||<math> 6904789</math>||<math> 11527693</math>||<math> 15296227</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11970}</math>||<math> 10531</math>||<math> 1911199</math>||<math> 2210573</math>||<math> 2298397</math>||<math> 15519563</math>||<math> 21608347</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12180}</math>||<math> 1067597</math>||<math> 1778461</math>||<math> 1784599</math>||<math> 3551221</math>||<math> 7384493</math>||<math> 12485003</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12390}</math>||<math> 184291</math>||<math> 651017</math>||<math> 804493</math>||<math> 1536187</math>||<math> 4158103</math>||<math> 4751293</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12600}</math>||<math> 435577</math>||<math> 558431</math>||<math> 571031</math>||<math> 727369</math>||<math> 2890117</math>||<math> 3367363</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12810}</math>||<math> 116953</math>||<math> 166909</math>||<math> 5627029</math>||<math> 6623117</math>||<math> 10981339</math>||<math> 10994149</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13020}</math>||<math> 1691411</math>||<math> 3574871</math>||<math> 22963981</math>||<math> 27098723</math>||<math> 29812603</math>||<math> 31218403</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13230}</math>||<math> 40543</math>||<math> 104651</math>||<math> 313219</math>||<math> 4705247</math>||<math> 4718477</math>||<math> 6268289</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13440}</math>||<math> 2141</math>||<math> 448741</math>||<math> 815261</math>||<math> 1560997</math>||<math> 1574437</math>||<math> 2070517</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13650}</math>||<math> 3343</math>||<math> 96997</math>||<math> 110647</math>||<math> 521047</math>||<math> 1590961</math>||<math> 2276503</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13860}</math>||<math> 110437</math>||<math> 124297</math>||<math> 138157</math>||<math> 148891</math>||<math> 152017</math>||<math> 152947</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14070}</math>||<math> 2679239</math>||<math> 2886281</math>||<math> 3817111</math>||<math> 6446353</math>||<math> 6460423</math>||<math> 6976289</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14280}</math>||<math> 364687</math>||<math> 749773</math>||<math> 1867573</math>||<math> 2146181</math>||<math> 2434997</math>||<math> 4112627</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14490}</math>||<math> 144667</math>||<math> 161263</math>||<math> 259603</math>||<math> 286333</math>||<math> 336251</math>||<math> 377809</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14700}</math>||<math> 36583</math>||<math> 578267</math>||<math> 8529749</math>||<math> 14365553</math>||<math> 14380253</math>||<math> 14830787</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14910}</math>||<math> 74161</math>||<math> 109367</math>||<math> 120977</math>||<math> 1260011</math>||<math> 1372211</math>||<math> 11898287</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15120}</math>||<math> 121853</math>||<math> 689459</math>||<math> 822383</math>||<math> 11354437</math>||<math> 37245407</math>||<math> 48384221</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15330}</math>||<math> 7713709</math>||<math> 8049187</math>||<math> 11583113</math>||<math> 12934973</math>||<math> 16769749</math>||<math> 30793649</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15540}</math>||<math> 160781</math>||<math> 580577</math>||<math> 4095187</math>||<math> 5838409</math>||<math> 9523079</math>||<math> 10473559</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15750}</math>||<math> 64579</math>||<math> 103409</math>||<math> 182587</math>||<math> 849869</math>||<math> 865619</math>||<math> 1468729</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15960}</math>||<math> 1847</math>||<math> 6037</math>||<math> 17807</math>||<math> 137147</math>||<math> 652969</math>||<math> 989977</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 16170}</math>||<math> 66179</math>||<math> 219451</math>||<math> 511843</math>||<math> 583421</math>||<math> 812431</math>||<math> 848567</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 16380}</math>||<math> 43759</math>||<math> 339263</math>||<math> 355643</math>||<math> 695047</math>||<math> 2011517</math>||<math> 2893309</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 16590}</math>||<math> 6703</math>||<math> 29009</math>||<math> 2489183</math>||<math> 4028743</math>||<math> 9340181</math>||<math> 10005263</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 16800}</math>||<math> 940319</math>||<math> 3772907</math>||<math> 3873007</math>||<math> 9905921</math>||<math> 79622351</math>||<math> 95679271</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17010}</math>||<math> 797119</math>||<math> 18296627</math>||<math> 23152907</math>||<math> 38133913</math>||<math> 60796007</math>||<math> 83709047</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17220}</math>||<math> 225769</math>||<math> 1452511</math>||<math> 1469731</math>||<math> 1606379</math>||<math> 2415473</math>||<math> 3469069</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17430}</math>||<math> 15643</math>||<math> 25471</math>||<math> 42901</math>||<math> 1170599</math>||<math> 3120547</math>||<math> 3983249</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17640}</math>||<math> 193607</math>||<math> 211247</math>||<math> 7624613</math>||<math> 10290239</math>||<math> 16104047</math>||<math> 22618907</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17850}</math>||<math> 129379</math>||<math> 289253</math>||<math> 1341433</math>||<math> 1728911</math>||<math> 1746761</math>||<math> 2918737</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18060}</math>||<math> 1013921</math>||<math> 1038209</math>||<math> 2703941</math>||<math> 3580333</math>||<math> 3914689</math>||<math> 11110339</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18270}</math>||<math> 29567</math>||<math> 511201</math>||<math> 1615723</math>||<math> 1890701</math>||<math> 1989811</math>||<math> 2008081</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18480}</math>||<math> 2711</math>||<math> 25643</math>||<math> 40853</math>||<math> 149143</math>||<math> 194839</math>||<math> 213319</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18690}</math>||<math> 881</math>||<math> 9421469</math>||<math> 10687877</math>||<math> 11455753</math>||<math> 14740463</math>||<math> 21499799</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18900}</math>||<math> 73823</math>||<math> 462079</math>||<math> 804113</math>||<math> 823013</math>||<math> 1323799</math>||<math> 1370987</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19110}</math>||<math> 63737</math>||<math> 322171</math>||<math> 520193</math>||<math> 999763</math>||<math> 1023487</math>||<math> 1032067</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19320}</math>||<math> 682411</math>||<math> 743747</math>||<math> 1343669</math>||<math> 1373233</math>||<math> 1782499</math>||<math> 2574437</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19530}</math>||<math> 50929</math>||<math> 738919</math>||<math> 1773689</math>||<math> 1793219</math>||<math> 6121807</math>||<math> 18867007</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19740}</math>||<math> 2729</math>||<math> 30757</math>||<math> 360163</math>||<math> 1652591</math>||<math> 18160973</math>||<math> 18862889</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19950}</math>||<math> 142699</math>||<math> 162649</math>||<math> 239957</math>||<math> 302287</math>||<math> 322237</math>||<math> 661547</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 20160}</math>||<math> 3330211</math>||<math> 5620609</math>||<math> 6413401</math>||<math> 15055609</math>||<math> 32094917</math>||<math> 52863893</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 20370}</math>||<math> 1158881</math>||<math> 1216213</math>||<math> 1236583</math>||<math> 3893899</math>||<math> 7991839</math>||<math> 8012209</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 20580}</math>||<math> 9689</math>||<math> 316501</math>||<math> 398023</math>||<math> 2047813</math>||<math> 2219557</math>||<math> 2240137</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 20790}</math>||<math> 12713</math>||<math> 20023</math>||<math> 141079</math>||<math> 159571</math>||<math> 296117</math>||<math> 914813</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 21000}</math>||<math> 5501</math>||<math> 19471</math>||<math> 65837</math>||<math> 688139</math>||<math> 3980407</math>||<math> 8983031</math>
 +
|}
 +
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 80%; text-align: right;"
 +
|- style="background: #98fb98; text-align: center;"
 +
| colspan=7 | <math>\mathbf{n = 10}</math>
 +
|- style="text-align: center;"
 +
| style="background: #ffd890;" | <math>\mathbf{d}</math>
 +
| colspan=6 | <math>\mathbf{p_0}</math>
 +
|-
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 210}</math>||<math> 199</math>||<math> 243051733</math>||<math> 498161423</math>||<math> 2490123989</math>||<math> 5417375591</math>||<math> 8785408259</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 420}</math>||<math> 52879</math>||<math> 3544939</math>||<math> 725283077</math>||<math> 1580792347</math>||<math> 1931425157</math>||<math> 8392393693</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 630}</math>||<math> 964417</math>||<math> 1021331</math>||<math> 3710699</math>||<math> 174610351</math>||<math> 396598051</math>||<math> 525173641</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 840}</math>||<math> 915611</math>||<math> 24748189</math>||<math> 33791509</math>||<math> 314727967</math>||<math> 510756371</math>||<math> 1079797657</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1050}</math>||<math> 130006783</math>||<math> 208734751</math>||<math> 400663741</math>||<math> 963551671</math>||<math> 1219200119</math>||<math> 1231110787</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1260}</math>||<math> 6722909</math>||<math> 27846803</math>||<math> 63289771</math>||<math> 1000262819</math>||<math> 1476482057</math>||<math> 4565705117</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1470}</math>||<math> 2534561</math>||<math> 189999707</math>||<math> 833570987</math>||<math> 1168004581</math>||<math> 2010828277</math>||<math> 3182258251</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1680}</math>||<math> 1343205113</math>||<math> 3033769813</math>||<math> 4093882757</math>||<math> 4112814241</math>||<math> 4348188919</math>||<math> 4749575333</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 1890}</math>||<math> 41513261</math>||<math> 95317913</math>||<math> 6232033069</math>||<math> 6361761239</math>||<math> 6709899029</math>||<math> 8521839071</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2100}</math>||<math> 34913</math>||<math> 581393</math>||<math> 8397091</math>||<math> 10200607</math>||<math> 31913837</math>||<math> 258411317</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2310}</math>||<math> 2564251</math>||<math> 7245143</math>||<math> 15898823</math>||<math> 34834237</math>||<math> 51404371</math>||<math> 60858179</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2520}</math>||<math> 1058597</math>||<math> 8226307</math>||<math> 438716653</math>||<math> 799422581</math>||<math> 975166567</math>||<math> 983999677</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2730}</math>||<math> 122069</math>||<math> 123059</math>||<math> 158633</math>||<math> 3319219</math>||<math> 3427393</math>||<math> 5082629</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 2940}</math>||<math> 2546781317</math>||<math> 3736609957</math>||<math> 4895747497</math>||||||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3150}</math>||<math> 34071019</math>||<math> 1174379903</math>||<math> 1247572429</math>||<math> 1914733781</math>||<math> 5502174781</math>||<math> 5598860513</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3360}</math>||<math> 210391</math>||<math> 762261571</math>||<math> 2289797801</math>||<math> 5842998881</math>||<math> 5973997177</math>||<math> 6486241481</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3570}</math>||<math> 150343</math>||<math> 920827</math>||<math> 47896129</math>||<math> 110935963</math>||<math> 124813783</math>||<math> 253908793</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3780}</math>||<math> 4045763</math>||<math> 162045979</math>||<math> 3611162221</math>||<math> 3953439013</math>||<math> 5751477079</math>||<math> 6389572141</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 3990}</math>||<math> 99877</math>||<math> 2732441</math>||<math> 145829681</math>||<math> 1512868211</math>||<math> 1519374557</math>||<math> 1905288811</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4200}</math>||<math> 75187297</math>||<math> 436800197</math>||<math> 825073159</math>||<math> 953483507</math>||<math> 1237285949</math>||<math> 1620977257</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4410}</math>||<math> 343475219</math>||<math> 718394137</math>||<math> 1714841501</math>||<math> 4312513897</math>||<math> 4433557501</math>||<math> 7302174197</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4620}</math>||<math> 85363</math>||<math> 372751</math>||<math> 926879</math>||<math> 10645541</math>||<math> 11022827</math>||<math> 11027447</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 4830}</math>||<math> 30427</math>||<math> 6020477</math>||<math> 16424981</math>||<math> 151254533</math>||<math> 229780123</math>||<math> 482610239</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5040}</math>||<math> 145866041</math>||<math> 226851517</math>||<math> 292104419</math>||<math> 517266257</math>||<math> 986618569</math>||<math> 1785262393</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5250}</math>||<math> 2117239</math>||<math> 134051459</math>||<math> 444256783</math>||<math> 635071121</math>||<math> 3239335223</math>||<math> 3689988833</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5460}</math>||<math> 2283571</math>||<math> 11988607</math>||<math> 17327831</math>||<math> 18230447</math>||<math> 97175423</math>||<math> 168445523</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5670}</math>||<math> 21206993</math>||<math> 42322087</math>||<math> 232282121</math>||<math> 530515507</math>||<math> 2074726021</math>||<math> 2176462667</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 5880}</math>||<math> 769792447</math>||<math> 1028745119</math>||<math> 2716511507</math>||<math> 2850255403</math>||<math> 4059527753</math>||<math> 4338343433</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6090}</math>||<math> 98202331</math>||<math> 218657237</math>||<math> 508050341</math>||<math> 965528153</math>||<math> 1963343323</math>||<math> 2133623147</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6300}</math>||<math> 46452799</math>||<math> 161073877</math>||<math> 416581987</math>||<math> 444443777</math>||<math> 799148171</math>||<math> 1536915817</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6510}</math>||<math> 155461</math>||<math> 11699279</math>||<math> 59259649</math>||<math> 82736531</math>||<math> 138908647</math>||<math> 156852947</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6720}</math>||<math> 62347</math>||<math> 18249241</math>||<math> 402509117</math>||<math> 646946233</math>||<math> 694032349</math>||<math> 748855249</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 6930}</math>||<math> 1664417</math>||<math> 3306839</math>||<math> 6703841</math>||<math> 10343167</math>||<math> 16988767</math>||<math> 17046329</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7140}</math>||<math> 12331793</math>||<math> 21994589</math>||<math> 32695477</math>||<math> 135554233</math>||<math> 355138829</math>||<math> 730901161</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7350}</math>||<math> 12683299</math>||<math> 21459209</math>||<math> 38446267</math>||<math> 423264613</math>||<math> 3158377081</math>||<math> 5208862573</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7560}</math>||<math> 7573327</math>||<math> 369901513</math>||<math> 2755541693</math>||<math> 2774476609</math>||<math> 3311703233</math>||<math> 5004136327</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7770}</math>||<math> 28549</math>||<math> 819317</math>||<math> 3721051</math>||<math> 11941571</math>||<math> 35273473</math>||<math> 46949093</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 7980}</math>||<math> 1024853</math>||<math> 355670309</math>||<math> 446786191</math>||<math> 547343483</math>||<math> 682871447</math>||<math> 1772834893</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8190}</math>||<math> 7328437</math>||<math> 15275849</math>||<math> 17503261</math>||<math> 22737017</math>||<math> 27294053</math>||<math> 45150331</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8400}</math>||<math> 8528483</math>||<math> 40313929</math>||<math> 243787771</math>||<math> 385895737</math>||<math> 467671013</math>||<math> 797154607</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8610}</math>||<math> 10892747</math>||<math> 17489623</math>||<math> 28416517</math>||<math> 55350017</math>||<math> 200631439</math>||<math> 449962543</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 8820}</math>||<math> 275550449</math>||<math> 340210649</math>||<math> 375439381</math>||<math> 1299902701</math>||<math> 7189505563</math>||<math> 8000213747</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9030}</math>||<math> 31057003</math>||<math> 150282967</math>||<math> 634308509</math>||<math> 643690123</math>||<math> 2295863833</math>||<math> 2515095703</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9240}</math>||<math> 53681</math>||<math> 14224981</math>||<math> 14432399</math>||<math> 23559377</math>||<math> 28467293</math>||<math> 42049001</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9450}</math>||<math> 334554023</math>||<math> 488051653</math>||<math> 2038389299</math>||<math> 2162899399</math>||<math> 2445407273</math>||<math> 3057392207</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9660}</math>||<math> 707071</math>||<math> 125628439</math>||<math> 303544463</math>||<math> 441911263</math>||<math> 449336813</math>||<math> 511484261</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 9870}</math>||<math> 16561691</math>||<math> 26691349</math>||<math> 373909451</math>||<math> 558247033</math>||<math> 626630117</math>||<math> 1074793063</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10080}</math>||<math> 3363089</math>||<math> 35937059</math>||<math> 57814343</math>||<math> 83864653</math>||<math> 264068017</math>||<math> 2293066417</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10290}</math>||<math> 459609859</math>||<math> 522069971</math>||<math> 535273337</math>||<math> 720980111</math>||<math> 1617247087</math>||<math> 1769323693</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10500}</math>||<math> 38610347</math>||<math> 185388121</math>||<math> 511207351</math>||<math> 512002717</math>||<math> 573447551</math>||<math> 728734969</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10710}</math>||<math> 2781203</math>||<math> 10327159</math>||<math> 15741997</math>||<math> 161184019</math>||<math> 290334601</math>||<math> 387848743</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 10920}</math>||<math> 527909</math>||<math> 8754457</math>||<math> 19711711</math>||<math> 68442943</math>||<math> 70092481</math>||<math> 108555763</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11130}</math>||<math> 187009</math>||<math> 74743931</math>||<math> 1717072597</math>||<math> 2241197341</math>||<math> 3885152797</math>||<math> 5442728839</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11340}</math>||<math> 13865323</math>||<math> 151172779</math>||<math> 155052347</math>||<math> 169766761</math>||<math> 417004037</math>||<math> 759377761</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11550}</math>||<math> 166601</math>||<math> 178151</math>||<math> 189701</math>||<math> 2902951</math>||<math> 2939267</math>||<math> 6906061</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11760}</math>||<math> 15296227</math>||<math> 115733179</math>||<math> 793412467</math>||<math> 2045327461</math>||<math> 3317282629</math>||<math> 3405094727</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 11970}</math>||<math> 70627031</math>||<math> 81131437</math>||<math> 190977547</math>||<math> 295424263</math>||<math> 435613939</math>||<math> 436230467</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12180}</math>||<math> 96579871</math>||<math> 196123667</math>||<math> 1414855181</math>||<math> 1594532899</math>||<math> 1852156771</math>||<math> 5477685029</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12390}</math>||<math> 355974491</math>||<math> 1228212781</math>||<math> 1597738157</math>||<math> 2356239043</math>||<math> 2537515919</math>||<math> 2664004501</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12600}</math>||<math> 558431</math>||<math> 4885897</math>||<math> 62631409</math>||<math> 222308641</math>||<math> 247236973</math>||<math> 597208309</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 12810}</math>||<math> 10981339</math>||<math> 73391203</math>||<math> 614195423</math>||<math> 722428933</math>||<math> 1804485667</math>||<math> 2011342889</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13020}</math>||<math> 37278391</math>||<math> 396360829</math>||<math> 477013687</math>||<math> 1035592279</math>||<math> 1668997513</math>||<math> 1740405707</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13230}</math>||<math> 4705247</math>||<math> 43971617</math>||<math> 150462859</math>||<math> 3214143193</math>||<math> 4385611183</math>||<math> 6156888427</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13440}</math>||<math> 1560997</math>||<math> 2070517</math>||<math> 319796189</math>||<math> 397320779</math>||<math> 534628103</math>||<math> 1466338729</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13650}</math>||<math> 96997</math>||<math> 8628157</math>||<math> 23309989</math>||<math> 84831493</math>||<math> 95865989</math>||<math> 183786877</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 13860}</math>||<math> 110437</math>||<math> 124297</math>||<math> 138157</math>||<math> 152947</math>||<math> 166807</math>||<math> 180667</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14070}</math>||<math> 6446353</math>||<math> 6976289</math>||<math> 9167027</math>||<math> 315420997</math>||<math> 324294169</math>||<math> 850130293</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14280}</math>||<math> 8022137</math>||<math> 46017523</math>||<math> 49573471</math>||<math> 84264127</math>||<math> 201286747</math>||<math> 664107853</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14490}</math>||<math> 4421849</math>||<math> 7258067</math>||<math> 55181701</math>||<math> 266196461</math>||<math> 400560449</math>||<math> 658093439</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14700}</math>||<math> 14365553</math>||<math> 79088123</math>||<math> 578429339</math>||<math> 1590374273</math>||<math> 1620663103</math>||<math> 1692678277</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 14910}</math>||<math> 1313271217</math>||<math> 1398822683</math>||<math> 3458123993</math>||<math> 5050258823</math>||<math> 8564509277</math>||
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15120}</math>||<math> 643929523</math>||<math> 1697175937</math>||<math> 3456724013</math>||<math> 3604668029</math>||<math> 5105194837</math>||<math> 5972188679</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15330}</math>||<math> 423644591</math>||<math> 792183047</math>||<math> 1013912467</math>||<math> 1239474463</math>||<math> 1707297247</math>||<math> 1918187839</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15540}</math>||<math> 15113711</math>||<math> 49877209</math>||<math> 90195289</math>||<math> 113317157</math>||<math> 542625751</math>||<math> 801528769</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15750}</math>||<math> 849869</math>||<math> 281904709</math>||<math> 741349123</math>||<math> 1196157763</math>||<math> 1264569469</math>||<math> 1628362679</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 15960}</math>||<math> 1847</math>||<math> 3178141</math>||<math> 47378869</math>||<math> 105168887</math>||<math> 140273363</math>||<math> 315104063</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 16170}</math>||<math> 3360767</math>||<math> 7292851</math>||<math> 8511059</math>||<math> 10038841</math>||<math> 26643899</math>||<math> 35098631</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 16380}</math>||<math> 339263</math>||<math> 2893309</math>||<math> 7118387</math>||<math> 189387287</math>||<math> 209606629</math>||<math> 266620267</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 16590}</math>||<math> 381816437</math>||<math> 695288453</math>||<math> 1555003309</math>||<math> 2096563163</math>||<math> 2844269837</math>||<math> 4876784057</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 16800}</math>||<math> 143614397</math>||<math> 681135667</math>||<math> 1337835403</math>||<math> 1547432483</math>||<math> 1809315247</math>||<math> 2850704453</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17010}</math>||<math> 83709047</math>||<math> 1041057263</math>||<math> 1265416651</math>||<math> 1665987569</math>||<math> 2529254831</math>||<math> 4576482871</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17220}</math>||<math> 1452511</math>||<math> 10612519</math>||<math> 16814099</math>||<math> 216348577</math>||<math> 382728461</math>||<math> 532388587</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17430}</math>||<math> 25471</math>||<math> 137293657</math>||<math> 632342783</math>||<math> 960368107</math>||<math> 5503090291</math>||<math> 6704824913</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17640}</math>||<math> 193607</math>||<math> 33411011</math>||<math> 511632469</math>||<math> 819466853</math>||<math> 960062011</math>||<math> 1178974859</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 17850}</math>||<math> 1728911</math>||<math> 4584401</math>||<math> 7627309</math>||<math> 77294621</math>||<math> 99462899</math>||<math> 170832131</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18060}</math>||<math> 51826531</math>||<math> 210101329</math>||<math> 235062067</math>||<math> 605501191</math>||<math> 1083324911</math>||<math> 2230437163</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18270}</math>||<math> 1989811</math>||<math> 825611753</math>||<math> 2281896011</math>||<math> 2468212757</math>||<math> 2968471043</math>||<math> 4958366753</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18480}</math>||<math> 194839</math>||<math> 1044739</math>||<math> 1075237</math>||<math> 2169967</math>||<math> 2467369</math>||<math> 3135841</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18690}</math>||<math> 90365419</math>||<math> 551760331</math>||<math> 1165944209</math>||<math> 1887703247</math>||<math> 1932471091</math>||<math> 3396823123</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 18900}</math>||<math> 804113</math>||<math> 1087721813</math>||<math> 2462595313</math>||<math> 3420103007</math>||<math> 5068097201</math>||<math> 5268928117</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19110}</math>||<math> 1023487</math>||<math> 6202067</math>||<math> 6640901</math>||<math> 19304167</math>||<math> 78325591</math>||<math> 152030453</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19320}</math>||<math> 13154717</math>||<math> 123351947</math>||<math> 180065461</math>||<math> 191400653</math>||<math> 307980523</math>||<math> 526607503</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19530}</math>||<math> 1773689</math>||<math> 128832049</math>||<math> 226504217</math>||<math> 544697521</math>||<math> 880832749</math>||<math> 1511819633</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19740}</math>||<math> 216443629</math>||<math> 1460073841</math>||<math> 2172351869</math>||<math> 3696955411</math>||<math> 4020404251</math>||<math> 4234603313</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 19950}</math>||<math> 142699</math>||<math> 302287</math>||<math> 661547</math>||<math> 64740661</math>||<math> 176566177</math>||<math> 562542581</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 20160}</math>||<math> 77727823</math>||<math> 585546277</math>||<math> 1013154997</math>||<math> 1309662637</math>||<math> 2007871577</math>||<math> 2231189419</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 20370}</math>||<math> 1216213</math>||<math> 7991839</math>||<math> 156234857</math>||<math> 1222246309</math>||<math> 2382533789</math>||<math> 2523592993</math>
 +
|-
 +
| style="background:#ffd890;"|<math>\mathbf{ 20580}</math>||<math> 2219557</math>||<math> 508048529</math>||<math> 906000787</math>||<math> 1111806827</math>||<math> 2134225213</math>||<math> 6894499589</math>
 
|-
 
|-
<math>\boldsymbol{a_k}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 20790}</math>||<math> 2397931</math>||<math> 4022297</math>||<math> 4043087</math>||<math> 15314617</math>||<math> 26974879</math>||<math> 35575247</math>
| <math>5</math> || <math>-7</math> || <math>9</math> || <math>-11</math> || <math>13</math> || <math>-15</math> || <math>17</math> || <math>-19</math> || <math>21</math> || <math>-23</math> || <math>25</math> || <math>-27</math> || <math>29</math> || <math>-31</math> || <math>33</math> || <math>-35</math> || <math>37</math> || <math>-39</math> || <math>41</math>
 
 
|-
 
|-
!  <math>\boldsymbol{Q}</math>
+
| style="background:#ffd890;"|<math>\mathbf{ 21000}</math>||<math> 49402277</math>||<math> 263368843</math>||<math> 701455591</math>||<math> 2403274567</math>||<math> 3097244987</math>||<math> 5984865767</math>
| <math>-1</math> || <math>2</math> || style="background-color: red" | <math>-2</math> || <math>3</math> || <math>-3</math> || <math>4</math> || <math>-4</math> || <math>5</math> || <math>-5</math> || <math>6</math> || style="background-color: red" | <math>-6</math> || <math>7</math> || <math>-7</math> || <math>8</math> || <math>-8</math> || <math>9</math> || <math>-9</math> || <math>10</math> || <math>-10</math>
 
 
|}
 
|}
 +
<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
  
Zauważmy, że
 
:* jeżeli liczba nieparzysta <math>m</math> jest liczbą kwadratową, to wybór <math>D</math> nie będzie możliwy
 
:* w&nbsp;przypadku zastosowania tej metody znajdziemy tylko liczby pierwsze lub pseudopierwsze Lucasa, które spełniają kongruencję <math>U_{m + 1} \equiv 0 \pmod{m}</math>, czyli tylko część liczb pseudopierwszych Lucasa określonych w&nbsp;definicji L22
 
  
 +
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C55</span><br/>
 +
Niech <math>d, k, k_0, n \in \mathbb{Z}_+</math> oraz <math>a \in \mathbb{Z}</math>. Jeżeli liczby <math>d</math> i <math>n</math> są względnie pierwsze, to reszty <math>r_1, r_2, \ldots, r_n</math> z&nbsp;dzielenia <math>n</math> kolejnych wyrazów ciągu arytmetycznego
  
Ponieważ Baillie i&nbsp;Wagstaff określili metodę zaproponowaną przez Selfridge'a jako metodę A, to pozostaniemy przy tej nazwie. Korzystając ze wzoru rekurencyjnego
+
::<math>x_k = a + k d \qquad</math> dla <math>\; k = k_0 + 1, \ldots, k_0 + n</math>
  
::<math> a_{k+1} =  
+
przez liczbę <math>n</math> są wszystkie różne i&nbsp;tworzą zbiór <math>S = \{ 0, 1, \ldots, n - 1 \}</math>. W&nbsp;szczególności wynika stąd, że wśród <math>n</math> kolejnych wyrazów ciągu arytmetycznego <math>(x_k)</math> jeden z&nbsp;tych wyrazów jest podzielny przez <math>n</math>.
  \begin{cases}
 
  \qquad \qquad 5 & \text{gdy } k = 1\\
 
      - a_k - 2 * \mathop{\textnormal{sign}}( a_k ) & \text{gdy } k \geqslant 2
 
  \end{cases}</math>
 
  
możemy łatwo napisać odpowiednią funkcję znajdującą liczby <math>P, Q</math> według tej metody.
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
Przypuśćmy, że dla pewnych różnych liczb naturalnych <math>i, j</math> takich, że <math>1 \leqslant i < j \leqslant n</math> liczby <math>a + (k_0 + i) d</math> oraz <math>a + (k_0 + j) d</math> dają tę samą resztę przy dzieleniu przez <math>n</math>. Zatem różnica tych liczb jest podzielna przez <math>n</math>
  
<span style="font-size: 90%; color:black;">MethodA(m) =
+
::<math>n| [a + (k_0 + j) d] - [a + (k_0 + i) d]</math>
{
 
'''local'''(a, js);
 
a = 5;
 
'''while'''( 1,
 
        js = jacobi(a, m);
 
        '''if'''( js == 0  &&  a % m <> 0, '''return'''([0, 0]) );
 
        '''if'''( js == -1, '''return'''([1, (1 - a)/4]) );
 
        a = -a - 2*'''sign'''(a);
 
      );
 
}</span>
 
  
Wyjaśnienia wymaga druga linia kodu w&nbsp;pętli <code>while</code>. Wiemy, że (zobacz J35)
+
Czyli
  
::<math>(a \mid m) = 0 \quad \qquad \Longleftrightarrow \quad \qquad \gcd (a, m) > 1</math>
+
::<math>n|d (j - i)</math>
  
Jednak z&nbsp;faktu, że <math>\gcd (a, m) > 1</math> nie wynika natychmiast, że liczba <math>m</math> jest liczbą złożoną. Rozważmy dwa przypadki: gdy <math>m \mid a</math> i <math>m \nmid a</math>.
+
Ponieważ liczby <math>d</math> i <math>n</math> są względnie pierwsze, to na mocy lematu Euklidesa (twierdzenie C72), mamy
  
Gdy <math>\gcd (a, m) > 1</math> i <math>m \mid a</math>, to <math>\gcd (a, m) = \gcd (k \cdot m, m) = m > 1</math> i&nbsp;nie jesteśmy w&nbsp;stanie rozstrzygnąć, czy liczba <math>m</math> jest liczbą pierwszą, czy złożoną. Widać to dobrze na prostych przykładach
+
::<math>n| (j - i)</math>
  
::<math>\gcd (7, 7) = \gcd (14, 7) = 7 > 1</math>
+
Co jest niemożliwe, bo <math>1 \leqslant j - i \leqslant n - 1 < n</math>.
  
::<math>\gcd (15, 15) = \gcd (30, 15) = 15 > 1</math>
+
Zatem reszty <math>r_1, r_2, \ldots, r_n</math> są wszystkie różne, a&nbsp;ponieważ jest ich <math>n</math>, czyli tyle ile jest różnych reszt z&nbsp;dzielenia przez liczbę <math>n</math>, to zbiór tych reszt jest identyczny ze zbiorem reszt z&nbsp;dzielenia przez <math>n</math>, czyli ze zbiorem <math>S = \{ 0, 1, 2, \ldots, n - 1 \}</math>.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
Gdy <math>\gcd (a, m) > 1</math> i <math>m \nmid a</math>, to <math>m</math> jest liczbą złożoną. Ponieważ <math>m \nmid a</math>, to <math>a = k \cdot m + r</math>, gdzie <math>r \in [1, m - 1]</math>. Mamy
 
  
::<math>\gcd (a, m) = \gcd (k \cdot m + r, m) = \gcd (r, m) = d</math>
 
  
Musi być <math>d > 1</math>, bo założyliśmy, że <math>\gcd (a, m) > 1</math> i&nbsp;musi być <math>d < m</math>, bo <math>d \leqslant r \leqslant m - 1</math>. Zatem <math>d</math> jest dzielnikiem nietrywialnym liczby <math>m</math> i <math>m</math> jest liczbą złożoną.
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C56</span><br/>
 +
Niech <math>d \in \mathbb{Z}_+</math> i&nbsp;niech będzie dany ciąg arytmetyczny liczb pierwszych o&nbsp;długości <math>n</math>
  
Omawiana linia kodu zapewnia wysłanie informacji o&nbsp;tym, że liczba <math>m</math> jest liczbą złożoną (zwrot wektora [0, 0]). W&nbsp;przypadku, gdy nie mamy takiej pewności, kontynuujemy szukanie liczby <math>a</math>, takiej że <math>(a \mid m) = - 1</math>, pozostawiając zbadanie pierwszości liczby <math>m</math> na kolejnym etapie testowania.
+
::<math>p_k = p_0 + k d \qquad</math> dla <math>\; k = 0, 1, \ldots, n - 1</math>
  
 +
Z żądania, aby dany ciąg arytmetyczny był ciągiem arytmetycznym liczb pierwszych, wynika, że muszą być spełnione następujące warunki
  
Uważny Czytelnik dostrzeże, że nie zbadaliśmy, czy spełniony jest warunek <math>\gcd (m, Q) = 1</math>. Nie musimy tego robić, bo zwracana przez funkcję <code>MethodA()</code> liczba <math>Q</math> jest względnie pierwsza z <math>m</math>. Omówimy ten problem dokładnie w&nbsp;zadaniu L30. Poniżej pokażemy, że nawet gdyby było <math>\gcd (m, Q) > 1</math>, to złożona liczba <math>m</math> nie zostanie uznana za liczbę pseudopierwszą Lucasa.
+
:* <math>p_0 \nmid d</math>
 +
:* <math>n \leqslant p_0</math>
 +
:* <math>P(n - 1) |d</math>
 +
:* jeżeli liczba pierwsza <math>q</math> nie dzieli <math>d</math>, to <math>n \leqslant q</math>
  
Zauważmy, że jeżeli <math>m</math> jest liczbą złożoną i&nbsp;ma dzielnik pierwszy <math>p < m</math>, który dzieli <math>Q</math>, to <math>p \mid Q</math> i <math>p \nmid P</math> (bo <math>P = 1</math>), zatem <math>p \nmid U_k</math> dla <math>k \geqslant 1</math> (zobacz L17), czyli nie może być
+
gdzie <math>P(t)</math> jest iloczynem wszystkich liczb pierwszych nie większych od <math>t</math>.
  
::<math>U_{m + 1} (1, Q) \equiv 0 \pmod{m}</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
'''Punkt 1.'''<br/>
 +
Gdyby <math>p_0 |d</math>, to dla <math>k \geqslant 1</math> mielibyśmy <math>p_k = p_0 \left( 1 + k \cdot \frac{d}{p_0} \right)</math> i&nbsp;wszystkie te liczby byłyby złożone.
  
bo mielibyśmy
+
'''Punkt 2.'''<br/>
 +
Ponieważ <math>p_0</math> dzieli <math>p_0 + p_0 d</math>, więc musi być <math>n - 1 < p_0</math>, czyli <math>n \leqslant p_0</math>.
  
::<math>U_{m + 1} (1, Q) \equiv 0 \pmod{p}</math>
+
'''Punkt 3.'''<br/>
 +
Niech <math>q</math> będzie liczbą pierwszą mniejszą od <math>n</math>, a&nbsp;liczby <math>r_k</math> będą resztami uzyskanymi z&nbsp;dzielenia liczb <math>p_k = p_0 + k d</math> przez <math>q</math>, dla <math>k = 0, 1, \ldots, q - 1</math>. Ponieważ z&nbsp;założenia liczby <math>p_0, \ldots, p_{n - 1}</math> są liczbami pierwszymi większymi od <math>q</math> (zauważmy, że <math>p_0 \geqslant n</math>), to żadna z&nbsp;reszt <math>r_k</math> nie może być równa zeru. Czyli mamy <math>q</math> reszt mogących przyjmować jedynie <math>q - 1</math> różnych wartości. Zatem istnieją różne liczby <math>i, j</math>, takie że <math>0 \leqslant i < j \leqslant q - 1</math>, dla których <math>r_i = r_j</math>. Wynika stąd, że różnica liczb
  
a to jest niemożliwe. Zatem program wykorzystujący twierdzenie L20 wykryje złożoność liczby <math>m</math>.
+
::<math>p_j - p_i = (p_0 + j d) - (p_0 + i d) = d (j - i)</math>
  
Łatwo pokażemy, że nie jest możliwe, aby liczba <math>m</math> była liczbą pierwszą i&nbsp;była dzielnikiem <math>Q</math>. Jeżeli <math>m</math> jest liczbą pierwszą, to istnieje dokładnie <math>\tfrac{m - 1}{2}</math> liczb kwadratowych modulo <math>p</math> i <math>\tfrac{m - 1}{2}</math> liczb niekwadratowych modulo <math>p</math>, zatem rozpoczynając od wyrazu <math>a_2</math> możemy dojść co najwyżej do wyrazu o&nbsp;indeksie <math>k = \tfrac{m - 1}{2} + 2</math>, czyli
+
musi być podzielna przez <math>q</math>. Ponieważ <math>q \nmid (j - i)</math>, bo <math>1 \leqslant j - i \leqslant q - 1 < q</math>, zatem z&nbsp;lematu Euklidesa <math>q|d</math>.
  
::<math>| a_k | \leqslant m + 4</math>
+
Z uwagi na fakt, że jest tak dla każdej liczby pierwszej <math>q < n</math>, liczba <math>d</math> musi być podzielna przez
  
Skąd wynika, że
+
::<math>P(n - 1) = \prod_{q < n} q</math>
  
::<math>| Q | = \left| {\small\frac{1 - a_k}{4}} \right| \leqslant {\small\frac{m + 5}{4}} < m</math>
+
'''Punkt 4.'''<br/>
 +
Ponieważ <math>P(n - 1)|d</math>, to wszystkie liczby pierwsze mniejsze od <math>n</math> muszą być dzielnikami <math>d</math>. Wynika stąd, że jeśli liczba pierwsza <math>q</math> nie dzieli <math>d</math>, to musi być <math>q \geqslant n</math>. Co należało pokazać.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
Ostatnia nierówność jest prawdziwa dla <math>m > {\small\frac{5}{3}}</math>, czyli dla wszystkich liczb pierwszych. Ponieważ <math>| Q | < m</math>, w&nbsp;przypadku gdy <math>m</math> jest liczbą pierwszą, to <math>m</math> nie może być dzielnikiem liczby <math>Q</math>.
 
  
  
 +
<span style="font-size: 110%; font-weight: bold;">Uwaga C57</span><br/>
 +
Czasami, zamiast pisać „ciąg arytmetyczny liczb pierwszych”, będziemy posługiwali się skrótem PAP od angielskiej nazwy „''prime arithmetic progression''”. Konsekwentnie zapis PAP-<math>n</math> będzie oznaczał ciąg arytmetyczny liczb pierwszych o&nbsp;długości <math>n</math>, a&nbsp;zapis PAP<math>(n, d, q)</math> ciąg arytmetyczny liczb pierwszych o&nbsp;długości <math>n</math>, pierwszym wyrazie <math>q</math> i&nbsp;różnicy <math>d</math>.
  
<span style="font-size: 110%; font-weight: bold;">Zadanie L30</span><br/>
 
Pokazać, że w&nbsp;przypadku, gdy dla kolejnych liczb <math>a_k = (- 1)^k (2 k + 1)</math> sprawdzamy, czy konsekwencją <math>(a_k \mid m) = 0</math> jest złożoność liczby <math>m</math>, to dla każdej liczby <math>Q</math> wyznaczonej metodą Selfridge'a jest <math>\gcd (Q, m) = 1</math>.
 
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
 
Niech <math>m = 21</math>. Rozpoczniemy od przykładu liczb <math>a_k = (- 1)^k (2 k + 1)</math> dla <math>k = 0, 1, \ldots, m - 1</math>.
 
  
::{| class="wikitable plainlinks"  style="font-size: 90%; text-align: center; margin-right: auto;"
+
<span style="font-size: 110%; font-weight: bold;">Uwaga C58</span><br/>
! <math>\boldsymbol{k}</math> !! <math>\boldsymbol{0}</math> !!  !!  !!  !!  !!  !!  !!  !!  !!  !! <math>\boldsymbol{(m-1)/2}</math> !!  !!  !!  !!  !!  !!  !!  !!  !!  !! <math>\boldsymbol{m-1}</math>
+
Jakkolwiek sądzimy, że istnieje nieskończenie wiele ciągów arytmetycznych liczb pierwszych rozpoczynających się od dowolnej liczby pierwszej <math>q</math> i&nbsp;o&nbsp;dowolnej długości <math>3 \leqslant n \leqslant q</math>, to obecnie jest to tylko nieudowodnione przypuszczenie.
|-
 
! <math>\boldsymbol{k}</math>  
 
| <math>0</math> || <math>1</math> || <math>2</math> || <math>3</math> || <math>4</math> || <math>5</math> || <math>6</math> || <math>7</math> || <math>8</math> || <math>9</math> || <math>10</math> || <math>11</math> || <math>12</math> || <math>13</math> || <math>14</math> || <math>15</math> || <math>16</math> || <math>17</math> || <math>18</math> || <math>19</math> || <math>20</math>
 
|-
 
! <math>\boldsymbol{a_k}</math>
 
| <math>1</math> || <math>-3</math> || <math>5</math> || <math>-7</math> || <math>9</math> || <math>-11</math> || <math>13</math> || <math>-15</math> || <math>17</math> || <math>-19</math> || <math>21</math> || <math>-23</math> || <math>25</math> || <math>-27</math> || <math>29</math> || <math>-31</math> || <math>33</math> || <math>-35</math> || <math>37</math> || <math>-39</math> || <math>41</math>
 
|-
 
! <math>\boldsymbol{R_m(a_k)}</math>
 
| <math>1</math> || <math>18</math> || <math>5</math> || <math>14</math> || <math>9</math> || <math>10</math> || <math>13</math> || <math>6</math> || <math>17</math> || <math>2</math> || <math>0</math> || <math>19</math> || <math>4</math> || <math>15</math> || <math>8</math> || <math>11</math> || <math>12</math> || <math>7</math> || <math>16</math> || <math>3</math> || <math>20</math>
 
|}
 
  
Zauważmy, że modulo <math>21</math> ciąg <math>(a_k) = (1, - 3, 5, - 7, \ldots, 37, - 39, 41)</math> jest identyczny z&nbsp;ciągiem <math>(0, 1, 2, \ldots, 19, 20)</math>, a&nbsp;ciąg <math>(| a_k |)</math> to kolejne liczby nieparzyste od <math>1</math> do <math>2 m - 1</math>.
+
Dlatego '''nawet dla najmniejszej''' liczby pierwszej <math>q</math> takiej, że <math>q \nmid d</math> nierówność <math>n \leqslant q</math>, pokazana w&nbsp;twierdzeniu C56, pozostaje nadal tylko oszacowaniem. W&nbsp;szczególności nie możemy z&nbsp;góry przyjmować, że dla liczby <math>n = q</math> znajdziemy taką liczbę <math>d</math> będącą wielokrotnością liczby <math>P(q - 1)</math> i&nbsp;niepodzielną przez <math>q</math>, że będzie istniał PAP<math>(q, d, q)</math>.
  
  
Poniżej pokażemy, dlaczego musi być <math>\gcd (Q, m) = 1</math>, gdzie <math>Q</math> jest liczbą wyznaczoną metodą Selfridge'a (o ile sprawdzana jest złożoność liczby <math>m</math> przy testowaniu kolejnych liczb <math>a_k</math>). Pogrubioną czcionką zaznaczone są symbole Jacobiego, które wykryły złożoność liczby <math>m</math>. Gdyby nie była badana złożoność, to wyliczona zostałaby wartość <math>Q</math> na podstawie innego wyrazu ciągu <math>a_k</math> (ten symbol Jacobiego został zapisany zwykłą czcionką).
 
  
::<math>m = 3 , \;\; (5 \mid 3) = - 1 , \;\; Q = - 1 , \;\; \gcd (m, Q) = 1</math>
+
<span style="font-size: 110%; font-weight: bold;">Przykład C59</span><br/>
 +
Rozważmy dwie różnice <math>d_1 = 6 = 2 \cdot 3</math> oraz <math>d_2 = 42 = 2 \cdot 3 \cdot 7</math>. Zauważmy, że liczba pierwsza <math>5</math> nie dzieli ani <math>d_1</math>, ani <math>d_2</math>. Co więcej, liczba pierwsza <math>5</math> jest '''najmniejszą''' liczbą pierwszą, która nie dzieli rozpatrywanych różnic, zatem nierówność <math>n \leqslant 5</math> zapewnia najmocniejsze oszacowanie długości ciągu <math>n</math>. Łatwo sprawdzamy w&nbsp;zamieszczonych tabelach, że dla <math>d = 6</math> oraz dla <math>d = 42</math> są ciągi o&nbsp;długości <math>3, 4, 5</math>, ale nie ma ciągów o&nbsp;długości <math>6, 7, \ldots</math>
  
::<math>m = 5 , \;\; (5 \mid 5) = 0 , \;\; (- 7 \mid 5) = - 1 , \;\; Q = 2 , \;\; \gcd (m, Q) = 1 \;\;</math> (zauważmy, że <math>(5 \mid 5) = 0</math> nie pozwala wnioskować o&nbsp;złożoności)
+
W szczególności z&nbsp;twierdzenia C56 wynika, że szukając ciągów arytmetycznych liczb pierwszych o&nbsp;określonej długości <math>n</math>, należy szukać ich tylko dla różnic <math>d</math> będących wielokrotnością liczby <math>P(n - 1)</math>.
  
::<math>m = 7 , \;\; (5 \mid 7) = - 1 , \;\; Q = - 1 , \;\; \gcd (m, Q) = 1</math>
 
  
::<math>m = 9 , \;\; </math> (liczba kwadratowa)
 
  
::<math>m = 11 , \;\; (- 11 \mid 11) = 0 , \;\; (13 \mid 11) = - 1 , \;\; Q = - 3 , \;\; \gcd (m, Q) = 1 \;\;</math> (zauważmy, że <math>(- 11 \mid 11) = 0</math> nie pozwala wnioskować o&nbsp;złożoności)
+
<span style="font-size: 110%; font-weight: bold;">Zadanie C60</span><br/>
 +
Wiemy, że liczby pierwsze <math>p > 3</math> można przedstawić w&nbsp;jednej z&nbsp;postaci <math>6 k - 1</math> lub <math>6 k + 1</math>. Pokazać, że jeżeli <math>p_0 = 3</math>, to dwa następne wyrazu rosnącego ciągu arytmetycznego liczb pierwszych są różnych postaci.
  
::<math>m = 13 , \;\; (5 \mid 13) = - 1 , \;\; Q = - 1 , \;\; \gcd (m, Q) = 1</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
 +
Ponieważ <math>p_0 = 3</math>, a&nbsp;rozpatrywany PAP jest rosnący, to kolejne wyrazy ciągu są większe od liczby <math>3</math> i&nbsp;mogą być przedstawione w&nbsp;jednej z&nbsp;postaci <math>6 k - 1</math> lub <math>6 k + 1</math>. Z&nbsp;twierdzenia C56 wiemy, że musi być <math>n \leqslant p_0 = 3</math>, czyli długość rozpatrywanego ciągu arytmetycznego liczb pierwszych wynosi dokładnie <math>3</math> i&nbsp;istnieją tylko dwa następne wyrazy.
  
::<math>m = 15 , \;\; \boldsymbol{(5 \mid 15) = 0} , \;\; (13 \mid 15) = - 1 , \;\; Q = - 3 , \;\; \gcd (m, Q) = 3 \;\;</math> (gdyby nie zbadano złożoności)
+
Rozważmy ciąg arytmetyczny liczb pierwszych składający się z&nbsp;trzech wyrazów <math>p, q, r</math> takich, że <math>p = 3</math>. Mamy
  
::<math>m = 17 , \;\; (5 \mid 17) = - 1 , \;\; Q = - 1 , \;\; \gcd (m, Q) = 1</math>
+
::<math>r = q + d = q + (q - p) = 2 q - p</math>
  
::<math>m = 19 , \;\; (- 7 \mid 19) = - 1 , \;\; Q = 2 , \;\; \gcd (m, Q) = 1</math>
+
Zatem
  
::<math>m = 21 , \;\; \boldsymbol{(- 7 \mid 21) = 0} , \;\; (- 11 \mid 21) = - 1 , \;\; Q = 3 , \;\; \gcd (m, Q) = 3 \;\;</math> (gdyby nie zbadano złożoności)
+
::<math>r + q = 3 q - 3</math>
  
 +
Widzimy, że prawa strona powyższej równości jest podzielna przez <math>3</math>. Zatem liczby po lewej stronie wypisanych wyżej równości muszą być różnych postaci, bo tylko w&nbsp;takim przypadku lewa strona równości będzie również podzielna przez <math>3</math>.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
Niech <math>m \geqslant 23</math>. Wiemy, że w&nbsp;ciągu <math>(5, - 7, 9, \ldots, \pm m, \mp (m + 2), \ldots, - (2 m - 3), 2 m - 1)</math> wystąpią liczby <math>a_k</math> takie, że <math>(a_k \mid m) = - 1</math>. Warunek <math>(a_k \mid m) = 0</math> oznacza, że <math>(2 k + 1 \mid m) = 0</math>, bo
 
  
::<math>(a_k \mid m) = ((- 1)^k (2 k + 1) \mid m) = ((- 1)^k \mid m) \cdot (2 k + 1 \mid m) = (- 1 \mid m)^k \cdot (2 k + 1 \mid m) = \pm (2 k + 1 \mid m)</math>
 
  
Jeżeli będą spełnione warunki <math>(a_k \mid m) = 0</math> i <math>R_m (a_k) \neq 0</math>, to liczba <math>m</math> będzie liczbą złożoną.
+
<span style="font-size: 110%; font-weight: bold;">Zadanie C61</span><br/>
 +
Wiemy, że liczby pierwsze <math>p > 3</math> można przedstawić w&nbsp;jednej z&nbsp;postaci <math>6 k - 1</math> lub <math>6 k + 1</math>. Pokazać, że wszystkie wyrazy rosnącego ciągu arytmetycznego liczb pierwszych <math>p_0, p_1, \ldots, p_{n - 1}</math>, gdzie <math>p_0 \geqslant 5</math> i <math>n \geqslant 3</math> muszą być jednakowej postaci.
  
Wypiszmy kolejne próby dla <math>m \geqslant 23</math>. Liczba <math>r</math> jest numerem próby.
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
 +
Niech liczby <math>p, q, r</math> będą trzema kolejnymi (dowolnie wybranymi) wyrazami rozpatrywanego ciągu. Łatwo zauważmy, że
  
::<math>r = 1 , \;\; a_{r + 1} = 5</math>
+
::<math>r = q + d = q + (q - p) = 2 q - p</math>
  
::{| border="0"
+
Zatem
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(5 \mid m) = 1</math> || <math>5 \nmid m \quad</math> || przechodzimy do kolejnego wyrazu ciągu <math>(a_k)</math>
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(5 \mid m) = 0</math> || <math>5 \mid m</math> || '''koniec'''
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(5 \mid m) = - 1 \quad</math> || <math>5 \nmid m</math> || <math>D = 5 , \;\; Q = - 1 , \;\; \gcd (m, Q) = 1 , \;\;</math> '''koniec'''
 
|}
 
  
::<math>r = 2 , \;\; a_{r + 1} = - 7</math>
+
::<math>p + q = 3 q - r</math>
  
::{| border="0"
+
::<math>q + r = 3 q - p</math>
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(- 7 \mid m) = 1</math> || <math>7 \nmid m \quad</math> || przechodzimy do kolejnego wyrazu ciągu <math>(a_k)</math>
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(- 7 \mid m) = 0</math> || <math>7 \mid m</math> || '''koniec'''
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(- 7 \mid m) = - 1 \quad</math> || <math>7 \nmid m</math> || <math>D = -7 , \;\; Q = 2 , \;\; \gcd (m, Q) = 1 , \;\;</math> '''koniec'''
 
|}
 
  
::<math>r = 3</math>, <math>a_{r + 1} = 9</math>
+
::<math>p + r = 2 q</math>
 
 
::{| border="0"
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(9 \mid m) = 1</math> || <math>3 \nmid m \quad</math> || przechodzimy do kolejnego wyrazu ciągu <math>(a_k)</math>
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(9 \mid m) = 0</math> || <math>3 \mid m</math> || '''koniec'''
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(9 \mid m) \neq - 1 \quad</math> || - - - - || bo <math>9</math> jest liczbą kwadratową
 
|}
 
  
 +
Zauważmy, że prawa strona wypisanych wyżej równości nie jest podzielna przez <math>3</math>, bo liczby <math>p, q, r</math> są liczbami pierwszymi większymi od liczby <math>3</math>. Zatem liczby po lewej stronie wypisanych wyżej równości muszą być tej samej postaci, bo gdyby było inaczej, to lewa strona tych równości byłaby podzielna przez <math>3</math>, a&nbsp;prawa nie. Czyli każda para liczb z&nbsp;trójki <math>p, q, r</math> musi być tej samej postaci i&nbsp;wynika stąd, że wszystkie trzy liczby muszą być tej samej postaci. Ponieważ trzy kolejne wyrazy ciągu <math>p_0, p_1, \ldots, p_{n - 1}</math> były wybrane dowolnie, to wszystkie wyrazy tego ciągu muszą być tej samej postaci.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
Po wykonaniu trzech prób niezakończonych sukcesem (tzn. wykryciem złożoności <math>m</math> lub ustaleniem wartości liczb <math>D</math> i <math>Q</math>) wiemy, że <math>m</math> nie jest podzielna przez żadną z&nbsp;liczb pierwszych <math>p = 3, 5, 7</math>.
 
  
::<math>r</math>-ta próba, gdzie <math>r \geqslant 4 , \;\;</math> wyraz <math>a_{r + 1}</math>
 
  
::{| border="0"
+
<span style="font-size: 110%; font-weight: bold;">Zadanie C62</span><br/>
|-style=height:2em
+
Niech <math>d > 0</math> będzie różnicą ciągu arytmetycznego liczb pierwszych o&nbsp;długości <math>n</math>
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(a_{r + 1} \mid m) = 1</math> || żadna liczba pierwsza <math>p \leqslant | a_{r + 1} | = 2 r + 3</math> nie dzieli liczby <math>m \quad</math> &nbsp;&nbsp;&nbsp;  || przechodzimy do kolejnego wyrazu ciągu <math>(a_k)</math>
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(a_{r + 1} \mid m) = 0</math> || A. jeżeli <math>m \mid a_{r + 1}</math><sup>( * )</sup><br/>B. jeżeli <math>m \nmid a_{r + 1}</math> || A. przechodzimy do kolejnego wyrazu ciągu <math>(a_k)</math> <br/> B. <math>a_{r + 1} \mid m</math><sup>( ** )</sup>, '''koniec'''
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(a_{r + 1} \mid m) = - 1 \quad</math> || żadna liczba pierwsza <math>p \leqslant | a_{r + 1} | = 2 r + 3</math> nie dzieli liczby <math>m \quad</math> &nbsp;&nbsp;&nbsp;  || <math>D = a_{r + 1}</math>, <math>Q = {\small\frac{1 - a_{r + 1}}{4}}</math>, '''koniec'''
 
|}
 
  
<sup>( * )</sup> jest to możliwe tylko dla <math>a_{r + 1} = a_{(m - 1) / 2} = m</math>
+
::<math>p_k = p_0 + k d \qquad</math> dla <math>\; k = 0, 1, \ldots, n - 1</math>
  
<sup>( ** )</sup> zauważmy, że jeżeli <math>m \nmid a_{r + 1}</math>, to <math>\gcd (a_{r + 1}, m) = | a_{r + 1} |</math>, bo gdyby liczba <math>| a_{r + 1} |</math> była liczbą złożoną, to żaden z&nbsp;jej dzielników pierwszych nie dzieliłby liczby <math>m</math>
+
Pokazać, nie korzystając z&nbsp;twierdzenia C56, że jeżeli liczba pierwsza <math>q</math> nie dzieli <math>d</math>, to <math>n \leqslant q</math>.
  
 +
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
 +
Przypuśćmy, że <math>n > q</math> tak, że <math>q < n \leqslant p_0</math>, zatem
  
Jeżeli nie została wykryta złożoność liczby <math>m</math>, to żadna z&nbsp;liczb pierwszych <math>p \leqslant | a_{r + 1} | = 2 r + 3</math> nie dzieli liczby <math>m</math>. Zatem <math>\gcd (Q, m) > 1</math> może być tylko w&nbsp;przypadku, gdy pewna liczba pierwsza <math>q \geqslant 2 r + 5</math> będzie wspólnym dzielnikiem liczb <math>Q</math> i <math>m</math>, ale jest to niemożliwe, bo
+
::<math>q < p_k = p_0 + k d \qquad</math> dla <math>\; k = 0, 1, \ldots, n - 1</math>
  
::<math>| Q | = \left| {\small\frac{1 - a_{r + 1}}{4}} \right| \leqslant {\small\frac{| a_{r + 1} | + 1}{4}} = {\small\frac{2 r + 4}{4}} < 2 r + 5 \leqslant q</math>
+
Ponieważ <math>q \nmid d</math>, to na mocy twierdzenia C55 wśród <math>q</math> kolejnych wyrazów <math>p_0, p_1, \ldots, p_{q - 1}</math> (zauważmy, że <math>q - 1 < n - 1</math>) jedna liczba pierwsza <math>p_k</math> musi być podzielna przez <math>q</math>, zatem musi być równa <math>q</math>. Jednak jest to niemożliwe, bo <math>q < p_k</math> dla wszystkich <math>k = 0, 1, \ldots, n - 1</math>. Zatem nie może być <math>n > q</math>.<br/>
 
 
Przedostatnia (ostra) nierówność jest prawdziwa dla wszystkich <math>r</math> naturalnych.<br/>
 
 
&#9633;
 
&#9633;
 
{{\Spoiler}}
 
{{\Spoiler}}
Linia 1371: Linia 2421:
  
  
<span style="font-size: 110%; font-weight: bold;">Zadanie L31</span><br/>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C63</span><br/>
Zmodyfikujmy metodę Selfridge'a w&nbsp;taki sposób, że będziemy rozpoczynali próby nie od wyrazu <math>a_2 = 5</math>, ale od wyrazu <math>a_3 = - 7</math>. Pokazać, że w&nbsp;przypadku, gdy dla kolejnych liczb <math>a_k = (- 1)^k (2 k + 1)</math> sprawdzamy, czy konsekwencją <math>(a_k \mid m) = 0</math> jest złożoność liczby <math>m</math>, to dla każdej liczby <math>Q</math> wyznaczonej tak zmodyfikowaną metodą Selfridge'a jest <math>\gcd (Q, m) = 1</math>.
+
Niech <math>q</math> będzie liczbą pierwszą, a&nbsp;liczby pierwsze
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
+
::<math>p_k = p_0 + k d \qquad</math> gdzie <math>\; k = 0, 1, \ldots, q - 1</math>
Poniżej pokażemy, dlaczego musi być <math>\gcd (Q, m) = 1</math>, gdzie <math>Q</math> jest liczbą wyznaczoną zmodyfikowaną metodą Selfridge'a (o ile sprawdzana jest złożoność liczby <math>m</math> przy testowaniu kolejnych liczb <math>a_k</math>). Pogrubioną czcionką zaznaczone są symbole Jacobiego, które wykryły złożoność liczby <math>m</math>. Gdyby nie była badana złożoność, to wyliczona zostałaby wartość <math>Q</math> na podstawie innego wyrazu ciągu <math>a_k</math> (ten symbol Jacobiego został zapisany zwykłą czcionką).
 
  
::<math>m = 3 , \;\; (- 7 \mid 3) = - 1 , \;\; Q = 2 , \;\; \gcd (m, Q) = 1</math>
+
tworzą ciąg arytmetyczny o&nbsp;długości <math>q</math> i&nbsp;różnicy <math>d > 0</math>.
  
::<math>m = 5 , \;\; (- 7 \mid 5) = - 1 , \;\; Q = 2 , \;\; \gcd (m, Q) = 1</math>
+
Równość <math>p_0 = q</math> zachodzi wtedy i&nbsp;tylko wtedy, gdy <math>q \nmid d</math>.
  
::<math>m = 7 , \;\; (- 7 \mid 7) = 0 , \;\; (- 11 \mid 7) = - 1 , \;\; Q = 3 , \;\; \gcd (m, Q) = 1</math> (zauważmy, że <math>(- 7 \mid 7) = 0</math> nie pozwala wnioskować o&nbsp;złożoności)
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
<math>\Longrightarrow</math><br/>
 +
Jeżeli <math>p_0 = q</math>, to <math>q</math>-wyrazowy ciąg arytmetyczny liczb pierwszych ma postać
  
::<math>m = 9 , \;\; </math> (liczba kwadratowa)
+
::<math>p_k = q + k d \qquad</math> dla <math>\; k = 0, 1, \ldots, q - 1</math>
  
::<math>m = 11 , \;\; (- 11 \mid 11) = 0 , \;\; (13 \mid 11) = - 1 , \;\; Q = - 3 , \;\; \gcd (m, Q) = 1 \;\;</math> (zauważmy, że <math>(- 11 \mid 11) = 0</math> nie pozwala wnioskować o&nbsp;złożoności)
+
Gdyby <math>q|d</math>, to mielibyśmy
  
::<math>m = 13 , \;\; (- 7 \mid 13) = - 1 , \;\; Q = 2 , \;\; \gcd (m, Q) = 1</math>
+
::<math>p_k = q \left( 1 + k \cdot \frac{d}{q} \right)</math>
  
::<math>m = 15 , \;\; \boldsymbol{(9 \mid 15) = 0} , \;\; (13 \mid 15) = - 1 , \;\; Q = - 3 , \;\; \gcd (m, Q) = 3 \;\;</math> (gdyby nie zbadano złożoności)
+
i wszystkie liczby <math>p_k</math> dla <math>k \geqslant 1</math> byłyby złożone, wbrew założeniu, że <math>p_k</math> tworzą <math>q</math>-wyrazowy ciąg arytmetyczny liczb pierwszych.
  
::<math>m = 17 , \;\; (- 7 \mid 17) = - 1 , \;\; Q = 2 , \;\; \gcd (m, Q) = 1</math>
+
<math>\Longleftarrow</math><br/>
 +
Ponieważ <math>q</math> jest długością rozpatrywanego ciągu arytmetycznego liczb pierwszych, to z&nbsp;twierdzenia C56 wynika, że musi być <math>q \leqslant p_0</math>.
  
::<math>m = 19 , \;\; (- 7 \mid 19) = - 1 , \;\; Q = 2 , \;\; \gcd (m, Q) = 1</math>
+
Z założenia liczba pierwsza <math>q</math> nie dzieli <math>d</math>, zatem z&nbsp;twierdzenia C55 wiemy, że <math>q</math> musi dzielić jedną z&nbsp;liczb <math>p_0, p_1, \ldots, p_{q - 1}</math>.
  
::<math>m = 21 , \;\; \boldsymbol{(- 7 \mid 21) = 0} , \;\; (- 11 \mid 21) = - 1 , \;\; Q = 3 , \;\; \gcd (m, Q) = 3 \;\;</math> (gdyby nie zbadano złożoności)
+
Jeżeli <math>q|p_k</math>, to <math>p_k = q</math>. Ponieważ <math>q \leqslant p_0</math>, to możliwe jest jedynie <math>q|p_0</math> i&nbsp;musi być <math>p_0 = q</math>.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
  
Niech <math>m \geqslant 23</math>. Wiemy, że w&nbsp;ciągu <math>( - 7, 9, \ldots, \pm m, \mp (m + 2), \ldots, - (2 m - 3), 2 m - 1)</math> wystąpią liczby <math>a_k</math> takie, że <math>(a_k \mid m) = - 1</math>. Warunek <math>(a_k \mid m) = 0</math> oznacza, że <math>(2 k + 1 \mid m) = 0</math>, bo
 
  
::<math>(a_k \mid m) = ((- 1)^k (2 k + 1) \mid m) = ((- 1)^k \mid m) \cdot (2 k + 1 \mid m) = (- 1 \mid m)^k \cdot (2 k + 1 \mid m) = \pm (2 k + 1 \mid m)</math>
+
<span style="font-size: 110%; font-weight: bold;">Uwaga C64</span><br/>
 +
Niech ciąg arytmetyczny liczb pierwszych o&nbsp;długości <math>n</math> ma postać
  
Jeżeli będą spełnione warunki <math>(a_k \mid m) = 0</math> i <math>R_m (a_k) \neq 0</math>, to liczba <math>m</math> będzie liczbą złożoną.
+
::<math>p_k = p_0 + k d \qquad</math> dla <math>\; k = 0, 1, \ldots, n - 1</math>
  
Wypiszmy kolejne próby dla <math>m \geqslant 23</math>. Liczba <math>r</math> jest numerem próby.
+
Z udowodnionych wyżej twierdzeń C56 i&nbsp;C63 wynika, że ciągi arytmetyczne liczb pierwszych o&nbsp;długości <math>n</math> można podzielić na dwie grupy
  
::<math>r = 1 , \;\; a_{r + 2} = - 7</math>
+
:* jeżeli <math>n</math> jest liczbą pierwszą i <math>n \nmid d</math>, to <math>P(n - 1) |d</math> oraz <math>p_0 = n</math> (dla ustalonego <math>d</math> może istnieć tylko jeden ciąg)
 +
:* jeżeli <math>n</math> jest liczbą złożoną lub <math>n|d</math>, to <math>P(n) |d</math> oraz <math>p_0 > n</math>
  
::{| border="0"
+
Funkcja <math>P(t)</math> jest iloczynem wszystkich liczb pierwszych nie większych od <math>t</math>.
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(- 7 \mid m) = 1</math> || <math>7 \nmid m \quad</math> || przechodzimy do kolejnego wyrazu ciągu <math>(a_k)</math>
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(- 7 \mid m) = 0</math> || <math>7 \mid m</math> || '''koniec'''
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(- 7 \mid m) = - 1 \quad</math> || <math>7 \nmid m</math> || <math>D = - 7 , \;\; Q = 2 , \;\; \gcd (m, Q) = 1 , \;\;</math> '''koniec'''
 
|}
 
  
::<math>r = 2 , \;\; a_{r + 2} = 9</math>
 
  
::{| border="0"
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(9 \mid m) = 1</math> || <math>3 \nmid m \quad</math> || przechodzimy do kolejnego wyrazu ciągu <math>(a_k)</math>
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(9 \mid m) = 0</math> || <math>3 \mid m</math> || '''koniec'''
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(9 \mid m) \neq - 1 \quad</math> || - - - - || bo <math>9</math> jest liczbą kwadratową
 
|}
 
  
::<math>r = 3 , \;\; a_{r + 2} = - 11</math>
+
<span style="font-size: 110%; font-weight: bold;">Przykład C65</span><br/>
 +
Niech różnica ciągu arytmetycznego liczb pierwszych wynosi <math>d = 10^t</math>, gdzie <math>t \geqslant 1</math>. Zauważmy, że dla dowolnego <math>t</math> liczba <math>3</math> jest najmniejszą liczbą pierwszą, która nie dzieli <math>d</math>. Z&nbsp;oszacowania <math>n \leqslant 3</math> wynika, że musi być <math>n = 3</math>.
  
::{| border="0"
+
Jeżeli długość ciągu <math>n = 3</math> i <math>n \nmid d</math>, to musi być <math>p_0 = n = 3</math> i&nbsp;może istnieć tylko jeden PAP dla każdego <math>d</math>. W&nbsp;przypadku <math>t \leqslant 10000</math> jedynie dla <math>t = 1, 5, 6, 17</math> wszystkie liczby ciągu arytmetycznego <math>(3, 3 + 10^t, 3 + 2 \cdot 10^t)</math> są pierwsze.
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(- 11 \mid m) = 1</math> || <math>11 \nmid m \quad</math> || przechodzimy do kolejnego wyrazu ciągu <math>(a_k)</math>
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(- 11 \mid m) = 0</math> || <math>11 \mid m</math> || '''koniec'''
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(- 11 \mid m) = - 1 \quad</math> || <math>11 \nmid m</math> || <math>D = - 11 , \;\; Q = 3 , \;\; \gcd (m, Q) = 1 , \;\;</math> '''koniec''' (bo liczby złożone <math>m = 3 k</math> zostały usunięte w&nbsp;poprzedniej próbie, <math>r = 2</math>)
 
|}
 
  
::<math>r = 4 , \;\; a_{r + 2} = 13</math>
 
  
::{| border="0"
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(13 \mid m) = 1</math> || <math>13 \nmid m \quad</math> || przechodzimy do kolejnego wyrazu ciągu <math>(a_k)</math>
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(13 \mid m) = 0</math> || <math>13 \mid m</math> || '''koniec'''
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(13 \mid m) = - 1 \quad</math> || <math>13 \nmid m</math> || <math>D = 13 , \;\; Q = - 3 , \;\; \gcd (m, Q) = 1 , \;\;</math> '''koniec''' (bo liczby złożone <math>m = 3 k</math> zostały usunięte w&nbsp;próbie o&nbsp;numerze <math>r = 2</math>)
 
|}
 
  
::<math>r = 5 , \;\; a_{r + 2} = - 15</math>
+
<span style="font-size: 110%; font-weight: bold;">Zadanie C66</span><br/>
 +
Znaleźć wszystkie PAP<math>(n, d, p)</math> dla <math>d = 2, 4, 8, 10, 14, 16</math>.
  
::{| border="0"
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
|-style=height:2em
+
Zauważmy, że dla każdej z&nbsp;podanych różnic <math>d</math>, liczba <math>3</math> jest najmniejszą liczbą pierwszą, która nie dzieli <math>d</math>. Z&nbsp;oszacowania <math>n \leqslant 3</math> wynika, że musi być <math>n = 3</math>.
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(- 15 \mid m) = 1</math> || <math>5 \nmid m \quad</math> || przechodzimy do kolejnego wyrazu ciągu <math>(a_k)</math>
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(- 15 \mid m) = 0</math> || <math>5 \mid m</math> || '''koniec'''
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(- 15 \mid m) = - 1 \quad</math> || <math>5 \nmid m</math> || <math>D = - 15 , \;\; Q = 4 , \;\; \gcd (m, Q) = 1 , \;\;</math> '''koniec'''
 
|}
 
 
 
 
 
Po wykonaniu pięciu prób niezakończonych sukcesem (tzn. wykryciem złożoności <math>m</math> lub ustaleniem wartości liczb <math>D</math> i <math>Q</math>) wiemy, że <math>m</math> nie jest podzielna przez żadną z&nbsp;liczb pierwszych <math>p = 3, 5, 7, 11, 13</math>.
 
 
 
::<math>r</math>-ta próba, gdzie <math>r \geqslant 6 , \;\;</math> wyraz <math>a_{r + 2}</math>
 
 
 
::{| border="0"
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(a_{r + 2} \mid m) = 1</math> || żadna liczba pierwsza <math>p \leqslant | a_{r + 2} | = 2 r + 5</math> nie dzieli liczby <math>m \quad</math> &nbsp;&nbsp;&nbsp;  || przechodzimy do kolejnego wyrazu ciągu <math>(a_k)</math>
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(a_{r + 2} \mid m) = 0</math> || A. jeżeli <math>m \mid a_{r + 2}</math><sup>( * )</sup><br/>B. jeżeli <math>m \nmid a_{r + 2}</math> || A. przechodzimy do kolejnego wyrazu ciągu <math>(a_k)</math> <br/> B. <math>a_{r + 1} \mid m</math><sup>( ** )</sup>, '''koniec'''
 
|-style=height:2em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>(a_{r + 2} \mid m) = - 1 \quad</math> || żadna liczba pierwsza <math>p \leqslant | a_{r + 2} | = 2 r + 5</math> nie dzieli liczby <math>m \quad</math> &nbsp;&nbsp;&nbsp;  || <math>D = a_{r + 2}</math>, <math>Q = {\small\frac{1 - a_{r + 2}}{4}}</math>, '''koniec'''
 
|}
 
 
 
<sup>( * )</sup> jest to możliwe tylko dla <math>a_{r + 2} = a_{(m - 1) / 2} = m</math>
 
 
 
<sup>( ** )</sup> zauważmy, że jeżeli <math>m \nmid a_{r + 2}</math>, to <math>\gcd (a_{r + 2}, m) = | a_{r + 2} |</math>, bo gdyby liczba <math>| a_{r + 2} |</math> była liczbą złożoną, to żaden z&nbsp;jej dzielników pierwszych nie dzieliłby liczby <math>m</math>
 
  
 +
Ponieważ <math>n = 3</math> jest liczbą pierwszą i&nbsp;dla wypisanych <math>d</math> liczba <math>n \nmid d</math>, to w&nbsp;każdym przypadku może istnieć tylko jeden ciąg, którego pierwszym wyrazem jest liczba pierwsza <math>p_0 = n = 3</math>. Dla <math>d = 2, 4, 8, 10, 14</math> łatwo znajdujemy odpowiednie ciągi
  
Jeżeli nie została wykryta złożoność liczby <math>m</math>, to żadna z&nbsp;liczb pierwszych <math>p \leqslant | a_{r + 2} | = 2 r + 5</math> nie dzieli liczby <math>m</math>. Zatem <math>\gcd (Q, m) > 1</math> może być tylko w&nbsp;przypadku, gdy pewna liczba pierwsza <math>q \geqslant 2 r + 7</math> będzie wspólnym dzielnikiem liczb <math>Q</math> i <math>m</math>, ale jest to niemożliwe, bo
+
::<math>(3, 5, 7)</math>, <math>\qquad (3, 7, 11)</math>, <math>\qquad (3, 11, 19)</math>, <math>\qquad (3, 13, 23)</math>, <math>\qquad (3, 17, 31)</math>
  
::<math>| Q | = \left| {\small\frac{1 - a_{r + 2}}{4}} \right| \leqslant {\small\frac{| a_{r + 2} | + 1}{4}} = {\small\frac{2 r + 6}{4}} < 2 r + 7 \leqslant q</math>
+
Dla <math>d = 16</math> szukany ciąg nie istnieje, bo <math>35 = 5 \cdot 7</math>.<br/>
 
 
Przedostatnia (ostra) nierówność jest prawdziwa dla wszystkich <math>r</math> naturalnych.<br/>
 
 
&#9633;
 
&#9633;
 
{{\Spoiler}}
 
{{\Spoiler}}
Linia 1490: Linia 2490:
  
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L32</span><br/>
+
<span style="font-size: 110%; font-weight: bold;">Zadanie C67</span><br/>
Przyjmując metodę Selfridge'a wyboru parametrów <math>P, Q</math> dla testu Lucasa, możemy łatwo napisać odpowiedni program w&nbsp;PARI/GP testujący pierwszość liczb
+
Znaleźć wszystkie PAP<math>(n, d, p)</math> dla <math>n = 3, 5, 7, 11</math> i <math>d = P (n - 1)</math>.
  
<span style="font-size: 90%; color:black;">LucasTest(m) =
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
{
+
Z założenia PAP ma długość <math>n</math>, liczba <math>n</math> jest liczbą pierwszą i <math>n \nmid d</math>. Zatem może istnieć tylko jeden PAP taki, że <math>p_0 = n</math>. Dla <math>n = 3, 5</math> i&nbsp;odpowiednio <math>d = 2, 6</math> otrzymujemy ciągi arytmetyczne liczb pierwszych
'''local'''(P, Q, X);
 
'''if'''( m % 2 == 0, '''return'''(m == 2) );
 
'''if'''( '''issquare'''(m), '''return'''(0) ); \\ sprawdzamy, czy m nie jest liczbą kwadratową
 
X = MethodA(m);
 
P = X[1];
 
Q = X[2];
 
'''if'''( P == 0, '''return'''(0) ); \\ jeżeli P = 0, to m jest liczbą złożoną
 
'''if'''( modLucas(m + 1, P, Q, m)[1] == 0, '''return'''(1), '''return'''(0) );
 
}</span>
 
  
 +
::<math>(3, 5, 7)</math>, <math>\qquad (5, 11, 17, 23, 29)</math>
  
 +
Ale dla <math>n = 7, 11</math> i&nbsp;odpowiednio <math>d = 30, 210</math> szukane ciągi nie istnieją, bo
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L33</span><br/>
+
::<math>(7, 37, 67, 97, 127, 157, {\color{Red} 187 = 11 \cdot 17})</math>
Najmniejsze liczby pseudopierwsze Lucasa, które pojawiają się przy zastosowaniu metody Selfridge'a wyboru parametrów <math>P</math> i <math>Q</math>, to
 
  
::<math>323, 377, 1159, 1829, 3827, 5459, 5777, 9071, 9179, 10877, 11419, 11663, 13919, 14839, 16109, 16211, 18407, 18971, 19043, 22499, \ldots</math>
+
::<math>(11, {\color{Red} 221 = 13 \cdot 17}, 431, 641, {\color{Red} 851 = 23 \cdot 37}, 1061, {\color{Red} 1271 = 31 \cdot 41}, 1481, {\color{Red} 1691 = 19 \cdot 89}, 1901, 2111)</math><br/>
 
+
&#9633;
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż kod|Hide=Ukryj kod}}
 
<span style="font-size: 90%; color:black;">'''forstep'''(k=1, 3*10^4, 2, '''if'''( LucasTest(k) && !'''isprime'''(k), '''print'''(k)) )</span>
 
<br/>
 
 
{{\Spoiler}}
 
{{\Spoiler}}
  
  
  
Tabela przedstawia ilość takich liczb nie większych od <math>10^n</math>
+
<span style="font-size: 110%; font-weight: bold;">Przykład C68</span><br/>
 +
Przedstawiamy przykładowe ciągi arytmetyczne liczb pierwszych, takie że <math>n = p_0</math> dla <math>n = 3, 5, 7, 11, 13</math>. Zauważmy, że wypisane w&nbsp;tabeli wartości <math>d</math> są wielokrotnościami liczby <math>P(n - 1)</math>.
  
::{| class="wikitable plainlinks"  style="font-size: 90%; text-align: right; margin-right: auto;"
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż tabelę|Hide=Ukryj tabelę}}
! <math>\boldsymbol{n}</math> !! <math>\boldsymbol{3}</math> !! <math>\boldsymbol{4}</math> !! <math>\boldsymbol{5}</math> !! <math>\boldsymbol{6}</math> !! <math>\boldsymbol{7}</math> !! <math>\boldsymbol{8}</math> !! <math>\boldsymbol{9}</math>
+
{| class="wikitable plainlinks"  style="display: inline-table; font-size: 80%; text-align: right;"
 +
|- style="text-align: center;"
 +
| style="background:#98fb98;"|<math>\mathbf{n = p_0}</math>
 +
| colspan=10 style="background:#ffd890;"| <math>\mathbf{d}</math>
 +
|-
 +
|-
 +
| style="background:#98fb98; text-align: center;"|<math>\mathbf{3}</math>||<math>2</math>||<math>4</math>||<math>8</math>||<math>10</math>||<math>14</math>||<math>20</math>||<math>28</math>||<math>34</math>||<math>38</math>||<math>40</math>
 +
|-
 +
| style="background:#98fb98; text-align: center;"|<math>\mathbf{5}</math>||<math>6</math>||<math>12</math>||<math>42</math>||<math>48</math>||<math>96</math>||<math>126</math>||<math>252</math>||<math>426</math>||<math>474</math>||<math>594</math>
 
|-
 
|-
| #LPSP <math>< 10^n</math> (metoda Selfridge'a) || <math>2</math> || <math>9</math> || <math>57</math> || <math>219</math> || <math>659</math> || <math>1911</math> || <math>5485</math>
+
| style="background:#98fb98; text-align: center;"|<math>\mathbf{7}</math>||<math>150</math>||<math>2760</math>||<math>3450</math>||<math>9150</math>||<math>14190</math>||<math>20040</math>||<math>21240</math>||<math>63600</math>||<math>76710</math>||<math>117420</math>
 +
|-
 +
| style="background:#98fb98; text-align: center;"|<math>\mathbf{11}</math>||<math>1536160080</math>||<math>4911773580</math>||<math>25104552900</math>||<math>77375139660</math>||<math>83516678490</math>||<math>100070721660</math>||<math>150365447400</math>||<math>300035001630</math>||<math>318652145070</math>||<math>369822103350</math>
 +
|-
 +
| style="background:#98fb98; text-align: center;"|<math>\mathbf{13}</math>||<math>9918821194590</math>||<math>104340979077720</math>||<math>187635245859600</math>||<math>232320390245790</math>||<math>391467874710990</math>||<math>859201916576850</math>||<math>1024574038282410</math>||<math>1074380369464710</math>||<math>1077624363457950</math>||<math>1185763337651970</math>
 
|}
 
|}
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż kod|Hide=Ukryj kod}}
+
 
<span style="font-size: 90%; color:black;">'''for'''(n=3, 9, s=0; '''forstep'''(k = 1, 10^n, 2, '''if'''( LucasTest(k) && !'''isprime'''(k), s++ ) ); '''print'''("n= ", n, "  ", s) )</span>
+
Przykłady takich ciągów dla jeszcze większych liczb pierwszych Czytelnik znajdzie na stronie [http://oeis.org/A088430 A088430].<br/>
<br/>
+
&#9633;
 
{{\Spoiler}}
 
{{\Spoiler}}
  
  
  
 +
<span style="font-size: 110%; font-weight: bold;">Przykład C69</span><br/>
 +
Liczby <math>3, 5, 7</math> są najprostszym przykładem ciągu arytmetycznego '''kolejnych''' liczb pierwszych. Zauważmy, że tylko w&nbsp;przypadku <math>n = 3</math> możliwa jest sytuacja, że <math>n = p_0 = 3</math>. Istotnie, łatwo stwierdzamy, że
  
 +
:* ponieważ <math>p_0</math> i <math>p_1</math> są '''kolejnymi''' liczbami pierwszymi, to <math>p_1 - p_0 < p_0</math> (zobacz zadanie B22)
 +
:* dla dowolnej liczby pierwszej <math>q \geqslant 5</math> jest <math>q < P (q - 1)</math> (zobacz zadanie B26)
  
== Liczby silnie pseudopierwsze Lucasa ==
+
Przypuśćmy teraz, że istnieje ciąg arytmetyczny '''kolejnych''' liczb pierwszych, taki że <math>n = p_0 \geqslant 5</math>. Mamy
  
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L34</span><br/>
+
::<math>d = p_1 - p_0 < p_0 < P (p_0 - 1) = P (n - 1)</math>
Jeżeli <math>p</math> jest liczbą pierwszą nieparzystą taką, że <math>\gcd (p, Q D) = 1</math> oraz <math>p - (D \mid p) = 2^r w</math>, gdzie <math>w</math> jest liczbą nieparzystą, to spełniony jest dokładnie jeden z&nbsp;warunków
 
  
::<math>U_w \equiv 0 \pmod{p}</math>
+
Zatem <math>P(n - 1) \nmid d</math>, co jest niemożliwe.
  
lub
+
Wynika stąd, że poza przypadkiem <math>n = p_0 = 3</math> ciąg arytmetyczny kolejnych liczb pierwszych musi spełniać warunek <math>P(n)|d</math>, czyli <math>P(n)|(p_1 - p_0)</math>.
  
::<math>V_{2^k w} \equiv 0 \pmod{p} \qquad</math> dla pewnego <math>k \in [0, r - 1]</math>
+
Poniższe tabele przedstawiają przykładowe ciągi arytmetyczne kolejnych liczb pierwszych o&nbsp;długościach <math>n = 3, 4, 5, 6</math> dla rosnących wartości <math>p_0</math>. Nie istnieje ciąg arytmetyczny kolejnych liczb pierwszych o&nbsp;długości <math>n = 7</math> dla <math>p_0 < 10^{13}</math>. Prawdopodobnie CPAP-7 pojawią się dopiero dla <math>p_0 \sim 10^{20}</math>.
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
+
Znane są ciągi arytmetyczne kolejnych liczb pierwszych o&nbsp;długościach <math>n \leqslant 10</math><ref name="CPAP1"/>.
Wiemy (zobacz L20), że jeżeli <math>p</math> jest liczbą pierwszą nieparzystą taką, że <math>\gcd (p, Q D) = 1</math>, to <math>p \mid U_{p - (D \mid p)}</math>. Z&nbsp;założenia jest <math>p - (D \mid p) = 2^r w</math>, zatem <math>p \mid U_{2^r w}</math>. Ponieważ założyliśmy, że <math>p \nmid Q</math> i <math>p \nmid D</math>, to ze wzoru <math>V^2_n - D U^2_n = 4 Q^n</math> (zobacz L13 p.14) wynika natychmiast, że <math>p</math> nie może dzielić jednocześnie liczb <math>U_n</math> i <math>V_n</math>.
 
  
Korzystając ze wzoru <math>U_{2 n} = U_n V_n</math> (zobacz L13 p.11), otrzymujemy
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż tabele|Hide=Ukryj tabele}}
  
::{| border="0"  
+
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 80%; text-align: right;"
|-style=height:3em
+
|- style="background: #98fb98; text-align: center;"
| &#9679;&nbsp;&nbsp;&nbsp; || <math>p \mid U_{2^r w} \;\; \Longleftrightarrow \;\; p \mid U_{2^{r - 1} w} \cdot V_{2^{r - 1} w} \quad</math> || Jeżeli <math>p \mid V_{2^{r - 1} w}</math>, to twierdzenie jest dowiedzione. Jeżeli <math>p \nmid V_{2^{r - 1} w}</math>, to <math>p \mid U_{2^{r - 1} w}</math>.
+
| colspan=2 | <math>\mathbf{n = 3}</math>
|-style=height:3em
+
|- style="text-align: center;"
| &#9679;&nbsp;&nbsp;&nbsp; || <math>p \mid U_{2^{r - 1} w} \;\; \Longleftrightarrow \;\; p \mid U_{2^{r - 2} w} \cdot V_{2^{r - 2} w} \quad</math> || Jeżeli <math>p \mid V_{2^{r - 2} w}</math>, to twierdzenie jest dowiedzione. Jeżeli <math>p \nmid V_{2^{r - 2} w}</math>, to <math>p \mid U_{2^{r - 2} w}</math>.
+
| <math>\mathbf{p_0 \leqslant 10^{3}}</math>
|-style=height:3em
+
| style="background: #ffd890;" | <math>\mathbf{d}</math>
| &#9679;&nbsp;&nbsp;&nbsp; || <math>.................</math> ||  
+
|-
|-style=height:3em
+
| <math>\mathbf{3}</math> || style="background:#ffd890;"|<math>2</math>
| &#9679;&nbsp;&nbsp;&nbsp; || <math>p \mid U_{4 w} \;\; \Longleftrightarrow \;\; p \mid U_{2 w} \cdot V_{2 w}</math> || Jeżeli <math>p \mid V_{2 w}</math>, to twierdzenie jest dowiedzione. Jeżeli <math>p \nmid V_{2 w}</math>, to <math>p \mid U_{2 w}</math>.
+
|-
|-style=height:3em
+
| <math>\mathbf{47}</math> || style="background:#ffd890;"|<math>6</math>
| &#9679;&nbsp;&nbsp;&nbsp; || <math>p \mid U_{2 w} \;\; \Longleftrightarrow \;\; p \mid U_w \cdot V_w</math> || Jeżeli <math>p \mid V_w</math>, to twierdzenie jest dowiedzione. Jeżeli <math>p \nmid V_w</math>, to <math>p \mid U_w</math>.
+
|-
 +
| <math>\mathbf{151}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{167}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{199}</math> || style="background:#ffd890;"|<math>12</math>
 +
|-
 +
| <math>\mathbf{251}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{257}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{367}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{557}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{587}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{601}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{647}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{727}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{941}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{971}</math> || style="background:#ffd890;"|<math>6</math>
 +
|}
 +
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 80%; text-align: right;"
 +
|- style="background: #98fb98; text-align: center;"
 +
| colspan=2 | <math>\mathbf{n = 4}</math>
 +
|- style="text-align: center;"
 +
| <math>\mathbf{p_0 \leqslant 10^{4}}</math>
 +
| style="background: #ffd890;" | <math>\mathbf{d}</math>
 +
|-
 +
| <math>\mathbf{251}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{1741}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{3301}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{5101}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{5381}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{6311}</math> || style="background:#ffd890;"|<math>6</math>
 +
|-
 +
| <math>\mathbf{6361}</math> || style="background:#ffd890;"|<math>6</math>
 +
|}
 +
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 80%; text-align: right;"
 +
|- style="background: #98fb98; text-align: center;"
 +
| colspan=2 | <math>\mathbf{n = 5}</math>
 +
|- style="text-align: center;"
 +
| <math>\mathbf{p_0 \leqslant 10^{8}}</math>
 +
| style="background: #ffd890;" | <math>\mathbf{d}</math>
 +
|-
 +
| <math>\mathbf{9843019}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{37772429}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{53868649}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{71427757}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{78364549}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{79080577}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{98150021}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{99591433}</math> || style="background:#ffd890;"|<math>30</math>
 +
|}
 +
{| class="wikitable plainlinks"  style="display: inline-table; margin-left: 5px; margin-right: 50px; font-size: 80%; text-align: right;"
 +
|- style="background: #98fb98; text-align: center;"
 +
| colspan=2 | <math>\mathbf{n = 6}</math>
 +
|- style="text-align: center;"
 +
| <math>\mathbf{p_0 \leqslant 10^{10}}</math>
 +
| style="background: #ffd890;" | <math>\mathbf{d}</math>
 +
|-
 +
| <math>\mathbf{121174811}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{1128318991}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{2201579179}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{2715239543}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{2840465567}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{3510848161}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{3688067693}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{3893783651}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{5089850089}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{5825680093}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{6649068043}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{6778294049}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{7064865859}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{7912975891}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{8099786711}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{9010802341}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{9327115723}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{9491161423}</math> || style="background:#ffd890;"|<math>30</math>
 +
|-
 +
| <math>\mathbf{9544001791}</math> || style="background:#ffd890;"|<math>30</math>
 
|}
 
|}
 +
<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
Z powyższego wynika, że musi być spełniony jeden z wypisanych w twierdzeniu warunków.
 
  
  
Zauważmy teraz, że jeżeli liczba pierwsza <math>p</math> dzieli <math>V_w</math>, to <math>p \nmid U_w</math>, bo <math>p</math> nie może jednocześnie być dzielnikiem liczb <math>U_w</math> i <math>V_w</math>.
+
<span style="font-size: 110%; font-weight: bold;">Zadanie C70</span><br/>
 +
Uzasadnij przypuszczenie, że ciągów arytmetycznych '''kolejnych''' liczb pierwszych o&nbsp;długości <math>n = 7</math> możemy oczekiwać dopiero dla <math>p_0 \sim 10^{20}</math>.
  
Zauważmy też, że jeżeli dla pewnego <math>k \in [1, r - 1]</math> liczba pierwsza <math>p</math> dzieli <math>V_{2^k w}</math>, to <math>p</math> nie dzieli żadnej liczby <math>V_{2^j w}</math> dla <math>j \in [0, k - 1] \;\; \text{i} \;\; p \nmid U_w</math>. Istotnie:
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Rozwiązanie|Hide=Ukryj rozwiązanie}}
 +
Zauważmy, że ilość liczb pierwszych nie większych od <math>x</math> w&nbsp;dobrym przybliżeniu jest określona funkcją <math>\frac{x}{\log x}</math>. Ponieważ funkcja <math>\log x</math> zmienia się bardzo wolno, to odcinki liczb naturalnych o&nbsp;tej samej długości położone w&nbsp;niewielkiej odległości od siebie będą zawierały podobne ilości liczb pierwszych. Przykładowo, dla dużych wartości <math>x</math>, ilość liczb pierwszych w&nbsp;przedziale <math>(x, 2 x)</math> jest tego samego rzędu, co ilość liczb pierwszych w&nbsp;przedziale <math>(1, x)</math><ref name="PrimesInInterval"/>.
  
::{| border="0"
 
|-style=height:3em
 
| &#9679;&nbsp;&nbsp;&nbsp; || jeżeli <math>p \mid V_{2^k w}</math>, to <math>p \nmid U_{2^k w} \;\; \text{i} \;\; U_{2^k w} = U_{2^{k - 1} w} V_{2^{k - 1} w}</math>, zatem <math>p</math> nie może być dzielnikiem żadnej z liczb <math>U_{2^{k - 1} w} \;\; \text{i} \;\; V_{2^{k - 1} w}</math>
 
|-style=height:3em
 
| &#9679;&nbsp;&nbsp;&nbsp; || jeżeli <math>p \nmid U_{2^{k - 1} w} \;\; \text{i} \;\; U_{2^{k - 1} w} = U_{2^{k - 2} w} V_{2^{k - 2} w}</math>, to <math>p</math> nie może być dzielnikiem żadnej z liczb <math>U_{2^{k - 2} w} \;\; \text{i} \;\; V_{2^{k - 2} w}</math>
 
|-style=height:3em
 
| &#9679;&nbsp;&nbsp;&nbsp; || <math>.................</math> ||
 
|-style=height:3em
 
| &#9679;&nbsp;&nbsp;&nbsp; || jeżeli <math>p \nmid U_{4 w} \;\; \text{i} \;\; U_{4 w} = U_{2 w} V_{2 w}</math>, to <math>p</math> nie może być dzielnikiem żadnej z liczb <math>U_{2 w} \;\; \text{i} \;\; V_{2 w}</math>
 
|-style=height:3em
 
| &#9679;&nbsp;&nbsp;&nbsp; || jeżeli <math>p \nmid U_{2 w} \;\; \text{i} \;\; U_{2 w} = U_w V_w</math>, to <math>p</math> nie może być dzielnikiem żadnej z liczb <math>U_w \;\; \text{i} \;\; V_w</math>
 
|}
 
  
 +
Zatem liczbę <math>\frac{1}{\log x}</math> możemy traktować jako prawdopodobieństwo trafienia na liczbę pierwszą wśród liczb znajdujących się w&nbsp;pobliżu liczby <math>x</math>. Zakładając, że liczby pierwsze są rozłożone przypadkowo, możemy wyliczyć prawdopodobieństwo tego, że <math>n</math> kolejnych liczb pierwszych, położonych w&nbsp;pobliżu liczby <math>x</math>, utworzy ciąg arytmetyczny
  
Co dowodzi, że spełniony jest dokładnie jeden z <math>r + 1</math> warunków:
+
::<math>\text{prob}_{\text{cpap}} (n, x) = \left( \frac{1}{\log x} \right)^n \left( 1 - \frac{1}{\log x} \right)^{(n - 1) (d - 1)}</math>
  
::<math>U_w \equiv 0 \pmod{p}</math>
+
gdzie <math>d = P (n)</math>. Jest tak, ponieważ w&nbsp;ciągu kolejnych liczb całkowitych musimy trafić na liczbę pierwszą, następnie na <math>d - 1</math> liczb złożonych, taka sytuacja musi się powtórzyć dokładnie <math>n - 1</math> razy, a&nbsp;na koniec znowu musimy trafić na liczbę pierwszą. Czyli potrzebujemy <math>n</math> liczb pierwszych, na które trafiamy z&nbsp;prawdopodobieństwem <math>\frac{1}{\log x}</math> oraz <math>(n - 1) (d - 1)</math> liczb złożonych, na które trafiamy z&nbsp;prawdopodobieństwem <math>1 - \frac{1}{\log x}</math>, a&nbsp;liczby te muszą pojawiać się w&nbsp;ściśle określonej kolejności.
  
::<math>V_{2^k w} \equiv 0 \pmod{p} \qquad</math> gdzie <math>k \in [0, r - 1]</math>
 
  
Co należało pokazać.<br/>
+
Ilość ciągów arytmetycznych utworzonych przez <math>n</math> kolejnych liczb pierwszych należących do przedziału <math>(x, 2 x)</math> możemy zatem oszacować na równą około
&#9633;
 
{{\Spoiler}}
 
  
 +
::<math>Q_{\text{cpap}}(n, x) = x \cdot \left( \frac{1}{\log x} \right)^n \left( 1 - \frac{1}{\log x} \right)^{(n - 1) (d - 1)}</math>
  
  
Konsekwentnie definiujemy liczby pseudopierwsze<br/>
+
Porównując powyższe oszacowanie z&nbsp;rzeczywistą ilością <math>\# \text{CPAP}(n, x)</math> ciągów arytmetycznych kolejnych liczb pierwszych w&nbsp;przedziale <math>(x, 2x)</math> dostajemy
<span style="font-size: 110%; font-weight: bold;">Definicja L35</span><br/>
 
Powiemy, że liczba złożona nieparzysta <math>m</math> jest liczbą silnie pseudopierwszą Lucasa (SLPSP) dla parametrów <math>P</math> i <math>Q</math>, jeżeli <math>\gcd (m, Q D) = 1</math> oraz <math>m - (D \mid m) = 2^r w</math>, gdzie <math>w</math> jest liczbą nieparzystą i&nbsp;spełniony jest jeden z&nbsp;warunków
 
  
::<math>U_w \equiv 0 \pmod{m}</math>
+
::<math>\frac{\# \text{CPAP}(n, x)}{Q_{\text{cpap}} (n, x)} = f (n, x)</math>
  
lub
+
gdzie w&nbsp;możliwym do zbadania zakresie, czyli dla <math>x < 2^{42} \approx 4.4 \cdot 10^{12}</math> mamy
  
::<math>V_{2^k w} \equiv 0 \pmod{m} \;</math> dla pewnego <math>k \in [0, r - 1]</math>
+
::<math>f(n, x) \approx a_n \cdot \log x + b_n</math>
  
 +
Stałe <math>a_n</math> i <math>b_n</math> wyznaczamy metodą regresji liniowej. Musimy pamiętać, że uzyskanych w&nbsp;ten sposób wyników nie możemy ekstrapolować dla dowolnie dużych <math>x</math>.
  
 +
W przypadku <math>n = 5</math> oraz <math>n = 6</math> dysponowaliśmy zbyt małą liczbą danych, aby wyznaczyć stałe <math>a_n</math> i <math>b_n</math> z&nbsp;wystarczającą dokładnością. Dlatego w&nbsp;tych przypadkach ograniczyliśmy się do podania oszacowania funkcji <math>f(n, x)</math>.
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L36</span><br/>
+
Uzyskany wyżej rezultaty są istotne, bo z&nbsp;wyliczonych postaci funkcji <math>f(n, x)</math> wynika, że są to funkcje bardzo wolno zmienne, a&nbsp;ich ekstrapolacja jest w&nbsp;pełni uprawniona.
Każda liczba SLPSP(<math>P, Q</math>) jest LPSP(<math>P, Q</math>). Korzystając ze zdefiniowanych wcześniej funkcji: <code>modPower(a, n, m)</code>, <code>jacobi(a, n)</code> i <code>modLucas(n, P, Q, m)</code> (zobacz K2, J41, L15), możemy napisać prosty program, który sprawdza, czy liczba <math>m</math> spełnia jeden z&nbsp;warunków podanych w&nbsp;twierdzeniu L34.
 
  
<span style="font-size: 90%; color: black;">isPrimeOr<span style="background-color: #fee481;">SLPSP</span>(m, P, Q) =
 
{
 
'''local'''(a, b, c, D, js, k, r, w, X);
 
D = P^2 - 4*Q;
 
'''if'''( gcd(m, 2*Q*D) > 1, '''return'''(0) );
 
js = jacobi(D, m);
 
r = '''valuation'''(m - js, 2); \\ znajdujemy wykładnik, z jakim liczba 2 występuje w m - js
 
w = (m - js) / 2^r;
 
X =  modLucas(w, P, Q, m);
 
a = X[1]; \\ U_w(P, Q) % m
 
b = X[2]; \\ V_w(P, Q) % m
 
'''if'''( a == 0 || b == 0, '''return'''(1) ); \\ b == 0 to przypadek k == 0
 
'''if'''( r == 1, '''return'''(0) ); \\ nie ma dalszych przypadków
 
c = modPower(Q, w, m); \\ Q^w % m
 
k = 0;
 
\\ sprawdzamy warunek V_(2^k * w) % m = 0; korzystamy ze wzoru V_(2*t) = (V_t)^2 - 2*Q^t
 
'''while'''( k++ < r,
 
        b = (b^2 - 2*c) % m;
 
        '''if'''( b == 0, '''return'''(1) );
 
        c = c^2 % m;
 
      );
 
'''return'''(0);
 
}</span>
 
  
 +
W zamieszczonej niżej tabeli mamy kolejno
  
 +
:* <math>n</math>, czyli długość CPAP
 +
:* wartość iloczynu <math>n \cdot P (n)</math>
 +
:* znalezioną postać funkcji <math>f(n, x)</math> lub oszacowanie wartości tej funkcji <math>C_n</math> na podstawie uzyskanych danych; w&nbsp;przypadku <math>n = 7</math> jest to oszacowanie wynikające z&nbsp;obserwacji, że wartości funkcji <math>f(n, x)</math> są rzędu <math>n \cdot P (n)</math>
 +
:* wyliczoną wartość <math>\frac{\# \text{CPAP}(n, 2^{40})}{Q_{\text{cpap}}(n, 2^{40})}</math>, czyli <math>f(n, 2^{40})</math>
 +
:* wartość funkcji <math>f(n, 2^{70})</math> wynikające z&nbsp;ekstrapolacji wzoru <math>f(n, x) = a_n \cdot \log x + b_n \qquad</math> (dla <math>n = 3, 4</math>)
 +
:* wartość <math>x</math> wynikającą z&nbsp;rozwiązania równania
 +
::: <math>\qquad (a_n \cdot \log x + b_n) \cdot Q_{\text{cpap}} (n, x) = 1 \qquad</math> (dla <math>n = 3, 4</math>)
 +
::: <math>\qquad C_n \cdot Q_{\text{cpap}} (n, x) = 1 \qquad</math> (dla <math>n = 5, 6, 7</math>)
 +
:* dla porównania w&nbsp;kolejnych kolumnach zostały podane dwie najmniejsze wartości <math>p_0</math> dla CPAP-n
  
<span style="font-size: 110%; font-weight: bold;">Przykład L37</span><br/>
+
::{| class="wikitable plainlinks"  style="font-size: 100%; text-align: right; margin-right: auto;"
Poniższa tabela zawiera najmniejsze liczby silnie pseudopierwsze Lucasa dla różnych parametrów <math>P</math> i <math>Q</math>
 
 
 
::{| class="wikitable plainlinks"  style="font-size: 90%; text-align: right; margin-right: auto;"
 
! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<math>\boldsymbol{P}</math><br/><math>\boldsymbol{Q}</math>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
! <math>\boldsymbol{1}</math> !! <math>\boldsymbol{2}</math> !! <math>\boldsymbol{3}</math> !! <math>\boldsymbol{4}</math> !! <math>\boldsymbol{5}</math> !! <math>\boldsymbol{6}</math> !! <math>\boldsymbol{7}</math> !! <math>\boldsymbol{8}</math> !! <math>\boldsymbol{9}</math> !! <math>\boldsymbol{10}</math>
 
 
|-
 
|-
! <math>\boldsymbol{- 5}</math>
+
! <math>n</math> !! <math>n \cdot P(n)</math> !! <math>f (n, x) \quad \text{lub} \quad C_n</math> !! <math>f (n, 2^{40})</math> !! <math>f (n, 2^{70})</math> !! <math>\sim p_0</math> !! <math></math> !! <math></math>
| <math>253</math> || <math>121</math> || style="background-color: yellow" | <math>143</math> || <math>781</math> || style="background-color: yellow" | <math>323</math> || style="background-color: yellow" | <math>299</math> || <math>121</math> || style="background-color: yellow" | <math>407</math> || <math>9</math> || style="background-color: yellow" | <math>143</math>  
 
 
|-
 
|-
! <math>\boldsymbol{- 4}</math>
+
| <math>\quad 3 \quad</math> || <math>18</math> || <math>0.52 \cdot \log x + 6.3</math> || <math>20.94</math> || <math>30</math> || <math>130</math> || <math>47</math> || <math>151</math>
| <math>9</math> || <math>4181</math> || <math>341</math> || <math>169</math> || <math>33</math> || style="background-color: yellow" | <math>119</math> || <math>57</math> || <math>9</math> || <math>9</math> || <math>9</math>  
 
 
|-
 
|-
! <math>\boldsymbol{- 3}</math>
+
| <math>\quad 4 \quad</math> || <math>24</math> || <math>0.53 \cdot \log x + 11.6</math> || <math>26.61</math> || <math>36</math> || <math>1.5 \cdot 10^3</math> || <math>251</math> || <math>1741</math>
| style="background-color: yellow" | <math>799</math> || <math>121</math> || style="background-color: yellow" | <math>527</math> || <math>25</math> || <math>85</math> || style="background-color: yellow" | <math>209</math> || style="background-color: yellow" | <math>55</math> || style="background-color: yellow" | <math>35</math> || <math>169</math> || <math>529</math>  
 
 
|-
 
|-
! <math>\boldsymbol{- 2}</math>
+
| <math>\quad 5 \quad</math> || <math>150</math> || <math>120</math> || <math>121.45</math> || <math></math> || <math>15 \cdot 10^6</math> || <math>9843019</math> || <math>37772429</math>
| <math>2047</math> || style="background-color: yellow" | <math>989</math> || <math>161</math> || <math>49</math> || <math>49</math> || style="background-color: yellow" | <math>323</math> || style="background-color: yellow" | <math>35</math> || style="background-color: yellow" | <math>35</math> || <math>9</math> || <math>265</math>  
 
 
|-
 
|-
! <math>\boldsymbol{- 1}</math>
+
| <math>\quad 6 \quad</math> || <math>180</math> || <math>235</math> || <math>228.27</math> || <math></math> || <math>540 \cdot 10^6</math> || <math>121174811</math> || <math>1128318991</math>
| <math>4181</math> || <math>169</math> || style="background-color: yellow" | <math>119</math> || <math>9</math> || <math>9</math> || style="background-color: yellow" | <math>629</math> || <math>25</math> || <math>33</math> || <math>9</math> || style="background-color: yellow" | <math>51</math>  
 
 
|-
 
|-
! <math>\boldsymbol{1}</math>
+
| <math>\quad 7 \quad</math> || <math>1470</math> || <math>2500</math> || <math>0</math> || <math></math> || <math>2 \cdot 10^{20}</math> || <math></math> || <math></math>
| <math>25</math> || style="background-color: red" | <math></math> || style="background-color: yellow" | <math>323</math> || style="background-color: yellow" | <math>209</math> || style="background-color: yellow" | <math>527</math> || style="background-color: yellow" | <math>35</math> || style="background-color: yellow" | <math>323</math> || style="background-color: yellow" | <math>559</math> || <math>9</math> || <math>49</math>
 
|-
 
! <math>\boldsymbol{2}</math>
 
| style="background-color: yellow" | <math>5459</math> || <math>9</math> || <math>2047</math> || <math>169</math> || <math>21</math> || <math>253</math> || <math>9</math> || style="background-color: yellow" | <math>15</math> || <math>9</math> || <math>49</math>
 
|-
 
! <math>\boldsymbol{3}</math>
 
| style="background-color: yellow" | <math>899</math> || style="background-color: yellow" | <math>5983</math> || <math>25</math> || <math>121</math> || <math>49</math> || <math>49</math> || style="background-color: yellow" | <math>35</math> || <math>55</math> || <math>25</math> || style="background-color: yellow" | <math>35</math>
 
|-
 
! <math>\boldsymbol{4}</math>
 
| style="background-color: yellow" | <math>899</math> || <math>25</math> || <math>1541</math> || style="background-color: red" | <math></math> || <math>341</math> || style="background-color: yellow" | <math>323</math> || style="background-color: yellow" | <math>377</math> || style="background-color: yellow" | <math>209</math> || <math>9</math> || style="background-color: yellow" | <math>527</math>
 
|-
 
! <math>\boldsymbol{5}</math>
 
| <math>9</math> || style="background-color: yellow" | <math>527</math> || <math>49</math> || style="background-color: yellow" | <math>527</math> || <math>4181</math> || <math>781</math> || style="background-color: yellow" | <math>39</math> || <math>9</math> || <math>9</math> || <math>9</math>  
 
 
|}
 
|}
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż kod|Hide=Ukryj kod}}
+
Zauważając, że funkcje <math>f(n, x)</math> są rzędu <math>n \cdot P (n)</math> i&nbsp;przyjmując, że podobnie będzie dla <math>f(7, x)</math>, możemy wyliczyć wartość <math>x</math>, dla której może pojawić się pierwszy CPAP-7. Wartość ta jest równa w&nbsp;przybliżeniu <math>2 \cdot 10^{20}</math> i&nbsp;wynika z&nbsp;rozwiązania równania
<span style="font-size: 90%; color:black;">FirstSLPSP(Stop) =
+
 
\\ najmniejsze SLPSP(P,Q) < Stop; dla 1<=P<=10 i -5<=Q<=5
+
::<math>f(7, x) \cdot Q_{\text{cpap}}(7, x) = 1</math>
{
+
 
  '''local'''(D, m, P, Q);
+
Możemy ją łatwo wyliczyć w&nbsp;PARI/GP. Oczywiście funkcję <math>f(7, x)</math> zastąpiliśmy jej oszacowaniem <math>C_7 = 2500</math>
Q = -6;
+
 
'''while'''( Q++ <= 5,
+
  P(n) = prod(k=2, n, if( isprime(k), k, 1 ))
        '''if'''( Q == 0, '''next'''() );
+
Q(x) = 2500 * x * ( 1/log(x) )^7 * ( 1 - 1/log(x) )^( (7-1)*(P(7)-1) )
        P = 0;
+
solve(x=10^10, 10^23, Q(x) - 1 )
        '''while'''( P++ <= 10,
 
              D = P^2 - 4*Q;
 
              '''if'''( D == 0,
 
                  '''print'''("Q= ", Q, "  P= ", P, "  ------------------");
 
                  '''next'''();
 
                );
 
              m = 3;
 
              '''while'''( m < Stop,
 
                      '''if'''( isPrimeOr<span style="background-color: #fee481;">SLPSP</span>(m, P, Q) &&  !'''isprime'''(m),
 
                          '''print'''("Q= ", Q, "  P= ", P, "  m= ", m, "  (D|m)= ", jacobi(D, m));
 
                          '''break'''();
 
                        );
 
                      m = m + 2;
 
                    );
 
            );
 
      );
 
}</span>
 
 
<br/>
 
<br/>
 +
&#9633;
 
{{\Spoiler}}
 
{{\Spoiler}}
  
Żółtym tłem oznaczyliśmy te najmniejsze liczby pseudopierwsze Lucasa, dla których <math>(D \mid m) = - 1</math>.
 
  
  
  
<span style="font-size: 110%; font-weight: bold;">Przykład L38</span><br/>
 
Ilość liczb SLPSP(<math>P, Q</math>) mniejszych od <math>10^9</math>
 
  
::{| class="wikitable plainlinks"  style="font-size: 90%; text-align: right; margin-right: auto;"
+
== Uzupełnienie ==
! &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<math>\boldsymbol{P}</math><br/><math>\boldsymbol{Q}</math>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
! <math>\boldsymbol{1}</math> !! <math>\boldsymbol{2}</math> !! <math>\boldsymbol{3}</math> !! <math>\boldsymbol{4}</math> !! <math>\boldsymbol{5}</math> !! <math>\boldsymbol{6}</math> !! <math>\boldsymbol{7}</math> !! <math>\boldsymbol{8}</math> !! <math>\boldsymbol{9}</math> !! <math>\boldsymbol{10}</math>
 
|-
 
! <math>\boldsymbol{- 5}</math>
 
| <math>1056</math> || <math>1231</math> || <math>1184</math> || <math>1264</math> || <math>2278</math> || <math>1284</math> || <math>1181</math> || <math>1174</math> || <math>1281</math> || <math>1429</math>
 
|-
 
! <math>\boldsymbol{- 4}</math>
 
| <math>1043</math> || <math>1165</math> || <math>2139</math> || <math>1316</math> || <math>1151</math> || <math>1079</math> || <math>1112</math> || <math>2377</math> || <math>1197</math> || <math>989</math>
 
|-
 
! <math>\boldsymbol{- 3}</math>
 
| <math>952</math> || <math>1514</math> || <math>1055</math> || <math>1153</math> || <math>1135</math> || <math>2057</math> || <math>998</math> || <math>1202</math> || <math>1077</math> || <math>1112</math>
 
|-
 
! <math>\boldsymbol{- 2}</math>
 
| <math>1282</math> || <math>1092</math> || <math>1212</math> || <math>1510</math> || <math>1155</math> || <math>1179</math> || <math>1173</math> || <math>2240</math> || <math>1089</math> || <math>2109</math>
 
|-
 
! <math>\boldsymbol{- 1}</math>
 
| <math>1165</math> || <math>1316</math> || <math>1079</math> || <math>2377</math> || <math>989</math> || <math>1196</math> || <math>1129</math> || <math>1050</math> || <math>1055</math> || <math>1147</math>
 
|-
 
! <math>\boldsymbol{1}</math>
 
| <math>282485800</math> || style="background-color: red" | <math></math> || <math>2278</math> || <math>2057</math> || <math>2113</math> || <math>2266</math> || <math>4053</math> || <math>2508</math> || <math>2285</math> || <math>3083</math>
 
|-
 
! <math>\boldsymbol{2}</math>
 
| <math>1776</math> || <math>449152466</math> || <math>1282</math> || <math>1316</math> || <math>1645</math> || <math>1413</math> || <math>1564</math> || <math>1595</math> || <math>1683</math> || <math>1435</math>
 
|-
 
! <math>\boldsymbol{3}</math>
 
| <math>1621</math> || <math>1553</math> || <math>282485800</math> || <math>1514</math> || <math>1530</math> || <math>1510</math> || <math>1588</math> || <math>1549</math> || <math>1468</math> || <math>1692</math>
 
|-
 
! <math>\boldsymbol{4}</math>
 
| <math>2760</math> || <math>282485800</math> || <math>2978</math> || style="background-color: red" | <math></math> || <math>2137</math> || <math>2278</math> || <math>1995</math> || <math>2057</math> || <math>2260</math> || <math>2113</math>
 
|-
 
! <math>\boldsymbol{5}</math>
 
| <math>1314</math> || <math>2392</math> || <math>1497</math> || <math>2392</math> || <math>1165</math> || <math>1268</math> || <math>1227</math> || <math>1411</math> || <math>1253</math> || <math>2377</math>
 
|}
 
  
 +
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C71 (lemat Bézouta)</span><br/>
 +
Jeżeli liczby całkowite <math>a</math> i <math>b</math> nie są jednocześnie równe zeru, a&nbsp;największy wspólny dzielnik tych liczb jest równy <math>D</math>, to istnieją takie liczby całkowite <math>x, y</math>, że
  
 +
::<math>a x + b y = D</math>
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż kod|Hide=Ukryj kod}}
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
<span style="font-size: 90%; color:black;">NumOfSLPSP(Stop) =
+
Niech <math>S</math> będzie zbiorem wszystkich liczb całkowitych dodatnich postaci <math>a n + b m</math>, gdzie <math>n, m</math> są dowolnymi liczbami całkowitymi. Zbiór <math>S</math> nie jest zbiorem pustym, bo przykładowo liczba <math>a^2 + b^2 \in S</math>. Z&nbsp;zasady dobrego uporządkowania liczb naturalnych wynika, że zbiór <math>S</math> ma element najmniejszy, oznaczmy go literą <math>d</math>.
\\ ilość liczb silnie pseudopierwszych Lucasa SLPSP(P,Q) < Stop;  dla 1<=P<=10 i -5<=Q<=5
 
{
 
'''local'''(D, m, P, Q);
 
Q = -6;
 
'''while'''( Q++ <= 5,
 
        '''if'''( Q == 0, '''next'''() );
 
        P = 0;
 
        '''while'''( P++ <= 10,
 
              D = P^2 - 4*Q;
 
              '''if'''( D == 0, '''print'''("Q= ", Q, "  P= ", P, "  ------------------"); '''next'''() );
 
              s = 0;
 
              m = 3;
 
              '''while'''( m < Stop,
 
                      '''if'''( isPrimeOr<span style="background-color: #fee481;">SLPSP</span>(m, P, Q)  &&  !'''isprime'''(m), s++ );
 
                      m = m + 2;
 
                    );
 
              '''print'''("Q= ", Q, "  P= ", P, "  s= ", s);
 
            );
 
      );
 
}</span>
 
<br/>
 
{{\Spoiler}}
 
  
 +
Pokażemy, że <math>d \mid a</math> i <math>d \mid b</math>. Z&nbsp;twierdzenia o&nbsp;dzieleniu z&nbsp;resztą możemy napisać <math>a = k d + r</math>, gdzie <math>0 \leqslant r < d</math>.
  
 +
Przypuśćmy, że <math>d \nmid a</math>, czyli że <math>r > 0</math>. Ponieważ <math>d \in S</math>, to mamy <math>d = a u + b v</math> dla pewnych liczb całkowitych <math>u</math> i <math>v</math>. Zatem
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L39</span><br/>
+
::<math>r = a - k d =</math>
Można pokazać<ref name="Arnault1"/>, że dla liczby złożonej nieparzystej <math>m \neq 9</math> i&nbsp;ustalonego <math>D</math> ilość par <math>P, Q</math> takich, że
 
  
:* <math>0 \leqslant P, Q < m</math>
+
::<math>\;\;\, = a - k (a u + b v) =</math>
:* <math>\gcd (Q, m) = 1</math>
 
:* <math>P^2 - 4 Q \equiv D \pmod{m}</math>
 
:* <math>m</math> jest SLPSP(<math>P, Q</math>)
 
  
nie przekracza <math>\tfrac{4}{15} n</math>.
+
::<math>\;\;\, = a \cdot (1 - k u) + b \cdot (- k v)</math>
  
Nie dotyczy to przypadku, gdy <math>m = p (p + 2)</math> jest iloczynem liczb pierwszych bliźniaczych takich, że <math>(D \mid p) = - (D \mid p + 2) = - 1</math>, wtedy mamy słabsze oszacowanie: <math>\# (P, Q) \leqslant \tfrac{1}{2} n</math>. Zauważmy, że taką sytuację łatwo wykryć, bo w&nbsp;tym przypadku <math>m + 1 = (p + 1)^2</math> jest liczbą kwadratową.
+
Wynika stąd, że dodatnia liczba <math>r</math> należy do zbioru <math>S</math> oraz <math>r < d</math>, wbrew określeniu liczby <math>d</math>, czyli musi być <math>r = 0</math> i <math>d \mid a</math>. Podobnie pokazujemy, że <math>d \mid b</math>.
  
 +
Jeżeli <math>d'</math> jest innym dzielnikiem liczb <math>a</math> i <math>b</math>, to <math>d' \mid d</math>, bo <math>d' \mid (a u + b v)</math>. Zatem <math>d' \leqslant d</math>, skąd wynika natychmiast, że liczba <math>d</math> jest największym z&nbsp;dzielników, które jednocześnie dzielą liczby <math>a</math> oraz <math>b</math>.
 +
Czyli <math>d = D</math>.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L40</span><br/>
 
Podobnie jak w&nbsp;przypadku liczb pseudopierwszych Lucasa LPSP(<math>P, Q</math>) tak i&nbsp;w&nbsp;przypadku liczb silnie pseudopierwszych Lucasa SLPSP(<math>P, Q</math>) możemy testować pierwszość liczby <math>m</math>, wybierając liczby <math>P, Q</math> losowo lub zastosować wybraną metodę postępowania. Przedstawiony poniżej program, to zmodyfikowany kod z uwagi L36. Teraz parametry <math>P, Q</math> są wybierane metodą Selfridge'a, a symbol Jacobiego <math>(D \mid m)</math> jest równy <math>- 1</math>.
 
  
<span style="font-size: 90%; color:black;">StrongLucasTest(m) =
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C72 (lemat Euklidesa)</span><br/>
{
+
Niech <math>p</math> będzie liczbą pierwszą oraz <math>a, b, d \in \mathbb{Z}</math>.
'''local'''(a, b, c, k, P, Q, r, w, X);
 
'''if'''( m % 2 == 0, '''return'''(m == 2) );
 
'''if'''( '''issquare'''(m), '''return'''(0) ); \\ sprawdzamy, czy liczba m nie jest kwadratowa
 
X = MethodA(m);
 
P = X[1];
 
Q = X[2];
 
'''if'''( P == 0 || '''gcd'''(m, 2*Q) > 1, '''return'''(0) ); \\ jeżeli P = 0, to m jest liczbą złożoną
 
r = '''valuation'''(m + 1, 2); \\ znajdujemy wykładnik, z jakim liczba 2 występuje w m + 1
 
w = (m + 1) / 2^r;
 
X =  modLucas(w, P, Q, m);
 
a = X[1]; \\ U_w(P, Q) % m
 
b = X[2]; \\ V_w(P, Q) % m
 
'''if'''( a == 0 || b == 0, '''return'''(1) ); \\ b == 0 to przypadek k == 0
 
'''if'''( r == 1, '''return'''(0) ); \\ nie ma dalszych przypadków
 
c = modPower(Q, w, m); \\ Q^w % m
 
k = 0;
 
\\ sprawdzamy warunek V_(2^k * w) %m = 0; korzystamy ze wzoru V_(2*w) = (V_w)^2 - 2*Q^w
 
'''while'''( k++ < r,
 
        b = (b^2 - 2*c) % m;
 
        '''if'''( b == 0, '''return'''(1) );
 
        c = c^2 % m;
 
      );
 
'''return'''(0);
 
}</span>
 
  
 +
:* jeżeli <math>d \mid a b</math> i liczba <math>d</math> jest względnie pierwsza z <math>a</math>, to <math>d \mid b</math>
  
 +
:* jeżeli <math>p \mid a b</math>, to <math>p \mid a</math> lub <math>p \mid b</math>
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L41</span><br/>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
Najmniejsze liczby silnie pseudopierwsze Lucasa, które otrzymujemy po zastosowaniu metody Selfridge'a wyboru parametrów <math>P</math> i <math>Q</math>, to
 
  
::<math>5459, 5777, 10877, 16109, 18971, 22499, 24569, 25199, 40309, 58519, 75077, 97439, \ldots</math>
+
'''Punkt 1.'''
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż kod|Hide=Ukryj kod}}
+
Z założenia liczby <math>d</math> i <math>a</math> są względnie pierwsze, zatem na mocy lematu Bézouta (twierdzenie C71) istnieją takie liczby całkowite <math>x</math> i <math>y</math>, że
<span style="font-size: 90%; color:black;">'''forstep'''(k=1, 10^5, 2, '''if'''( StrongLucasTest(k) && !'''isprime'''(k), '''print'''(k)) )</span>
 
<br/>
 
{{\Spoiler}}
 
  
 +
::<math>d x + a y = 1</math>
  
Tabela przedstawia ilość takich liczb nie większych od <math>10^n</math>
+
Mnożąc obie strony równania przez <math>b</math>, dostajemy
  
::{| class="wikitable plainlinks"  style="font-size: 90%; text-align: right; margin-right: auto;"
+
::<math>d b x + a b y = b</math>
! <math>\boldsymbol{n}</math> !! <math>\boldsymbol{3}</math> !! <math>\boldsymbol{4}</math> !! <math>\boldsymbol{5}</math> !! <math>\boldsymbol{6}</math> !! <math>\boldsymbol{7}</math> !! <math>\boldsymbol{8}</math> !! <math>\boldsymbol{9}</math>
 
|-
 
| #SLPSP <math>< 10^n</math> (metoda Selfridge'a) || <math>0</math> || <math>2</math> || <math>12</math> || <math>58</math> || <math>178</math> || <math>505</math> || <math>1415</math>
 
|}
 
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż kod|Hide=Ukryj kod}}
+
Obydwa wyrazy po prawej stronie są podzielne przez <math>d</math>, bo z założenia <math>d \mid a b</math>. Zatem prawa strona również jest podzielna przez <math>d</math>, czyli <math>d \mid b</math>. Co kończy dowód punktu pierwszego.
<span style="font-size: 90%; color:black;">'''for'''(n=3, 9, s=0; '''forstep'''(k = 1, 10^n, 2, '''if'''( StrongLucasTest(k) && !'''isprime'''(k), s++ ) ); '''print'''("n=", n, "  ", s) )</span>
 
<br/>
 
{{\Spoiler}}
 
  
 +
'''Punkt 2.'''
  
 +
Jeżeli <math>p \nmid a</math>, to <math>\gcd (p, a) = 1</math>, zatem z punktu pierwszego wynika, że <math>p \mid b</math>.
  
 +
Jeżeli <math>p \nmid b</math>, to <math>\gcd (p, b) = 1</math>, zatem z punktu pierwszego wynika, że <math>p \mid a</math>.
  
 +
Czyli <math>p</math> musi dzielić przynajmniej jedną z liczb <math>a, b</math>. Co należało pokazać.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
== Test BPSW ==
 
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L42</span><br/>
 
Jest <math>488</math> liczb SPSP(<math>2</math>) mniejszych od <math>10^8</math> i są 582 liczby SPSP(<math>3</math>) mniejsze od <math>10^8</math> (zobacz K20). Ale jest aż <math>21</math> liczb mniejszych od <math>10^8</math> silnie pseudopierwszych jednocześnie względem podstaw <math>2</math> i <math>3</math>:
 
  
<math>1373653, 1530787, 1987021, 2284453, 3116107, 5173601, 6787327, 11541307, 13694761, 15978007, 16070429,</math>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C73</span><br/>
 +
Niech <math>a, b, m \in \mathbb{Z}</math>. Jeżeli <math>a \mid m</math> i <math>b \mid m</math> oraz <math>\gcd (a, b) = 1</math>, to <math>a b \mid m</math>.
  
<math>16879501, 25326001, 27509653, 27664033, 28527049, 54029741, 61832377, 66096253, 74927161, 80375707</math>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Pokaż kod|Hide=Ukryj kod}}
+
Z założenia istnieją takie liczby <math>r, s, x, y \in \mathbb{Z}</math>, że <math>m = a r</math> i <math>m = b s</math> oraz
<span style="font-size: 90%; color:black;">'''forstep'''(m=3, 10^8, 2, '''if'''( isPrimeOr<span style="background-color: #fee481;">SPSP</span>(m, 2)  &&  isPrimeOr<span style="background-color: #fee481;">SPSP</span>(m, 3)  &&  !'''isprime'''(m), '''print'''("m=", m) ) )</span>
 
<br/>
 
{{\Spoiler}}
 
  
Widzimy, że prawdopodobieństwo błędnego rozpoznania pierwszości w&nbsp;przypadku liczb mniejszych od <math>10^8</math> dla podstaw <math>2</math> i <math>3</math> jest rzędu kilku milionowych. Gdyby prawdopodobieństwa błędnego rozpoznania pierwszości w&nbsp;przypadku podstaw <math>2</math> i <math>3</math> były niezależne, to spodziewalibyśmy się, że nie będzie wcale liczb mniejszych od <math>10^8</math> silnie pseudopierwszych jednocześnie względem podstaw <math>2</math> i <math>3</math>, bo prawdopodobieństwo takiego zdarzenia byłoby równe kilkudziesięciu bilonowym. Ale tak nie jest.
+
::<math>a x + b y = 1</math>
  
Jest to mocny argument za tym, że zastosowanie różnych (niezależnych) testów może być znacznie silniejszym narzędziem do testowania pierwszości liczb, niż wielokrotne stosowanie tego samego testu, gdzie poszczególne próby są tylko pozornie niezależne.
+
(zobacz C71). Zatem
  
Połączenie znanych nam już testów prowadzi do prostego programu
+
::<math>m = m (a x + b y)</math>
  
<span style="font-size: 90%; color:black;">BPSWtest(m) =
+
::<math>\quad \, = m a x + m b y </math>
{
 
'''forprime'''(p = 2, 1000, '''if'''( m % p > 0, '''next'''() ); '''if'''( m == p, '''return'''(1), '''return'''(0) ));
 
'''if'''( !isPrimeOr<span style="background-color: #fee481;">SPSP</span>(m, 2), '''return'''(0) );
 
'''if'''( !StrongLucasTest(m), '''return'''(0), '''return'''(1) );
 
}</span>
 
  
 +
::<math>\quad \, = b s a x + a r b y</math>
  
 +
::<math>\quad \, = a b (s x + r y)</math>
  
Funkcja <code>BPSWtest(m)</code> kolejno sprawdza:
+
Czyli <math>a b \mid m</math>. Co należało pokazać.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
:* czy liczba <math>m</math> jest podzielna przez niewielkie liczby pierwsze (w naszym przypadku mniejsze od <math>1000</math>); jeśli tak, to sprawdza, czy <math>m</math> jest liczbą pierwszą, czy złożoną i&nbsp;zwraca odpowiednio <math>1</math> lub <math>0</math>
 
:* czy liczba <math>m</math> przechodzi test Millera-Rabina dla podstawy <math>2</math>; jeśli nie, to zwraca <math>0</math>
 
:* czy liczba <math>m</math> przechodzi silny test Lucasa dla parametrów <math>P</math> i <math>Q</math>, które wybieramy metodą Selfridge'a; jeśli nie, to zwraca <math>0</math>, w&nbsp;przeciwnym wypadku zwraca <math>1</math>
 
  
  
Test w&nbsp;dokładnie takiej postaci zaproponowali Robert Baillie i&nbsp;Samuel Wagstaff<ref name="BaillieWagstaff1"/>. Nazwa testu to akronim, utworzony od pierwszych liter nazwisk Roberta Bailliego, Carla Pomerance'a, Johna Selfridge'a i&nbsp;Samuela Wagstaffa.
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C74</span><br/>
 +
Niech <math>a, b, c \in \mathbb{Z}</math>. Równanie <math>a x + b y = c</math> ma rozwiązanie wtedy i&nbsp;tylko wtedy, gdy największy wspólny dzielnik liczb <math>a</math> i <math>b</math> jest dzielnikiem liczby <math>c</math>.
  
Nie jest znany żaden przykład liczby złożonej <math>m</math>, którą test BPSW<ref name="BPSW1"/><ref name="BPSW2"/> identyfikowałby jako pierwszą i&nbsp;z&nbsp;pewnością nie ma takich liczb dla <math>m < 2^{64} \approx 1.844 \cdot 10^{19}</math>. Warto przypomnieć: potrzebowaliśmy siedmiu testów Millera-Rabina (dla podstaw <math>2, 3, 5, 7, 11, 13, 17</math>), aby mieć pewność, że dowolna liczba <math>m < 3.41 \cdot 10^{14}</math> jest pierwsza (zobacz K21).
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 +
Niech <math>D</math> oznacza największy wspólny dzielnik liczb <math>a</math> i <math>b</math>.
  
 +
<math>\Longrightarrow</math>
  
 +
Jeżeli liczby całkowite <math>x_0</math> i <math>y_0</math> są rozwiązaniem rozpatrywanego równania, to
  
 +
::<math>a x_0 + b y_0 = c</math>
  
 +
Ponieważ <math>D</math> dzieli lewą stronę równania, to musi również dzielić prawą, zatem musi być <math>D|c</math>.
  
== Uzupełnienia ==
+
<math>\Longleftarrow</math>
  
&nbsp;
+
Jeżeli <math>D|c</math>, to możemy napisać <math>c = k D</math> i&nbsp;równanie przyjmuje postać
  
=== <span style="border-bottom:1px solid #000;">Pewne własności współczynników dwumianowych</span> ===
+
::<math>a x + b y = k D</math>
  
&nbsp;
+
Lemat Bézouta (twierdzenie C71) zapewnia istnienie liczb całkowitych <math>x_0</math> i <math>y_0</math> takich, że
  
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L43</span><br/>
+
::<math>a x_0 + b y_0 = D</math>
Jeżeli <math>p</math> jest liczbą pierwszą, to
 
  
::<math>\binom{p}{k} \equiv 0 \pmod{p}</math>
+
Czyli z&nbsp;lematu Bézouta wynika, że równanie <math>a x + b y = D</math> ma rozwiązanie w&nbsp;liczbach całkowitych. Przekształcając, dostajemy
  
dla każdego <math>k \in [1, p - 1]</math>.
+
::<math>a(k x_0) + b (k y_0) = k D</math>
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
+
Zatem liczby <math>k x_0</math> i <math>k y_0</math> są rozwiązaniem równania
Łatwo zauważamy, że dla <math>k \in [1, p - 1]</math> liczba pierwsza <math>p</math> dzieli licznik, ale nie dzieli mianownika współczynnika dwumianowego
 
  
::<math>\binom{p}{k} = {\small\frac{p!}{k! \cdot (p - k)!}}</math>
+
::<math>a x + b y = k D</math>
  
zatem <math>p \biggr\rvert \binom{p}{k}</math>. Co należało pokazać.<br/>
+
Co oznacza, że równianie <math>a x + b y = c</math> ma rozwiązanie.<br/>
 
&#9633;
 
&#9633;
 
{{\Spoiler}}
 
{{\Spoiler}}
Linia 1921: Linia 2891:
  
  
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L44</span><br/>
+
<span style="font-size: 110%; font-weight: bold;">Uwaga C75</span><br/>
Jeżeli <math>p</math> jest liczbą pierwszą nieparzystą, to
+
Z twierdzenia C74 wynika, że szukając rozwiązań równania <math>A x + B y = C</math> w&nbsp;liczbach całkowitych, powinniśmy
  
::<math>\binom{p + 1}{k} \equiv 0 \pmod{p}</math>
+
:* obliczyć największy wspólny dzielnik <math>D</math> liczb <math>A</math> i <math>B</math>
 +
:* jeżeli <math>D > 1</math>, należy sprawdzić, czy <math>D|C</math>
 +
:* jeżeli <math>D \nmid C</math>, to równanie <math>A x + B y = C</math> nie ma rozwiązań w&nbsp;liczbach całkowitych
 +
:* jeżeli <math>D|C</math>, należy podzielić obie strony równania <math>A x + B y = C</math> przez <math>D</math> i&nbsp;przejść do rozwiązywania równania równoważnego <math>a x + b y = c</math>, gdzie <math>a = \frac{A}{D}</math>, <math>b = \frac{B}{D}</math>, <math>c = \frac{C}{D}</math>, zaś największy wspólny dzielnik liczb <math>a</math> i <math>b</math> jest równy <math>1</math>.
  
dla każdego <math>k \in [2, p - 1]</math>.
 
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
 
Jeżeli <math>k \in [2, p - 1]</math>, to modulo <math>p</math> dostajemy
 
  
::<math>\binom{p + 1}{k} = \binom{p}{k} + \binom{p}{k - 1} \equiv 0 \pmod{p}</math>
+
<span style="font-size: 110%; font-weight: bold;">Twierdzenie C76</span><br/>
 +
Niech <math>a, b, c \in \mathbb{Z}</math>. Jeżeli liczby <math>a</math> i <math>b</math> są względnie pierwsze, to równanie
 +
 
 +
::<math>a x + b y = c</math>
 +
 
 +
ma nieskończenie wiele rozwiązań w&nbsp;liczbach całkowitych.
  
Bo liczba pierwsza <math>p</math> dzieli licznik, ale nie dzieli mianownika współczynników dwumianowych po prawej stronie. Co należało pokazać.<br/>
+
Jeżeli para liczb całkowitych <math>(x_0, y_0)</math> jest jednym z&nbsp;tych rozwiązań, to wszystkie pozostałe rozwiązania całkowite można otrzymać ze wzorów
&#9633;
 
{{\Spoiler}}
 
  
 +
::<math>x = x_0 + b t</math>
 +
::<math>y = y_0 - a t</math>
  
 +
gdzie <math>t</math> jest dowolną liczbą całkowitą.
  
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L45</span><br/>
+
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
Jeżeli <math>p</math> jest liczbą pierwszą, to
+
Z założenia liczby <math>a</math> i <math>b</math> są względnie pierwsze, zatem największy wspólny dzielnik tych liczb jest równy <math>1</math> i&nbsp;dzieli liczbę <math>c</math>. Na mocy twierdzenia C74 równanie
  
::<math>\binom{p - 1}{k} \equiv (- 1)^k \pmod{p}</math>
+
::<math>a x + b y = c</math>
  
dla każdego <math>k \in [0, p - 1]</math>.
+
ma rozwiązanie w&nbsp;liczbach całkowitych.
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
+
Zauważmy, że jeżeli para liczb całkowitych <math>(x_0, y_0)</math> jest rozwiązaniem równania <math>a x + b y = c</math>, to para liczb <math>(x_0 + b t, y_0 - a t)</math> również
Łatwo sprawdzamy, że twierdzenie jest prawdziwe dla liczby pierwszej parzystej <math>p = 2</math>. Załóżmy, że <math>p</math> jest liczbą pierwszą nieparzystą. Równie łatwo sprawdzamy, że twierdzenie jest prawdziwe dla <math>k = 0</math> i <math>k = 1</math>. Zauważmy, że dla <math>k \in [1, p - 1]</math> jest
+
jest rozwiązaniem. Istotnie
  
::<math>\binom{p - 1}{k} = {\small\frac{(p - 1) !}{k! (p - 1 - k) !}} = {\small\frac{p - k}{k}} \cdot {\small\frac{(p - 1) !}{(k - 1) ! (p - k) !}} = {\small\frac{p - k}{k}} \cdot \binom{p - 1}{k - 1} = {\small\frac{p}{k}} \cdot \binom{p - 1}{k - 1} - \binom{p - 1}{k - 1}</math>
+
::<math>a(x_0 + b t) + b (y_0 - a t) = a x_0 + a b t + b y_0 - b a t =</math>
  
Ponieważ współczynniki dwumianowe są liczbami całkowitymi, a&nbsp;liczba <math>k \in [2, p - 1]</math> nie dzieli liczby pierwszej nieparzystej <math>p</math>, to <math>k</math> musi dzielić liczbę <math>\binom{p - 1}{k - 1}</math>. Zatem dla <math>k \in [2, p - 1]</math> modulo <math>p</math> mamy
+
:::::::::<math>\, = a x_0 + b y_0 =</math>
  
::<math>\binom{p - 1}{k} \equiv - \binom{p - 1}{k - 1}\pmod{p}</math>
+
:::::::::<math>\, = c</math>
  
Skąd otrzymujemy
+
Pokażmy teraz, że nie istnieją inne rozwiązania niż określone wzorami
  
::<math>\binom{p - 1}{k} \equiv (- 1)^1 \binom{p - 1}{k - 1} \equiv (- 1)^2 \binom{p - 1}{k - 2} \equiv \ldots \equiv (- 1)^{k - 2} \binom{p - 1}{2} \equiv (- 1)^{k - 1} \binom{p - 1}{1} \equiv (- 1)^k \pmod{p}</math>
+
::<math>x = x_0 + b t</math>
 +
::<math>y = y_0 - a t</math>
  
Co należało pokazać.<br/>
+
gdzie <math>t</math> jest dowolną liczbą całkowitą.
&#9633;
 
{{\Spoiler}}
 
  
 +
Przypuśćmy, że pary liczb całkowitych <math>(x, y)</math> oraz <math>(x_0, y_0)</math> są rozwiązaniami rozpatrywanego równania, zatem
  
 +
::<math>a x + b y = c = a x_0 + b y_0</math>
  
<span style="font-size: 110%; font-weight: bold;">Twierdzenie L46</span><br/>
+
Wynika stąd, że musi być spełniony warunek
Dla współczynników dwumianowych prawdziwe są następujące wzory
 
  
::<math>\underset{k \; \text{parzyste}}{\sum_{k = 0}^{n}} \binom{n}{k} = 2^{n - 1}</math>
+
::<math>a(x - x_0) = b (y_0 - y)</math>
  
::<math>\underset{k \; \text{nieparzyste}}{\sum_{k = 1}^{n}} \binom{n}{k} = 2^{n - 1}</math>
+
Ponieważ liczby <math>a</math> i <math>b</math> są względnie pierwsze, to na mocy lematu Euklidesa (twierdzenie C72) <math>b|(x - x_0)</math>. Skąd mamy
  
{{Spoiler|Style = font-style: italic; font-weight: bold; color: olive; text-decoration: underline;|Show=Dowód|Hide=Ukryj dowód}}
+
::<math>x - x_0 = b t</math>
Ze wzoru dwumianowego
 
  
::<math>(a + b)^n = \sum_{k = 0}^{n} \binom{n}{k} a^{n - k} b^k</math>
+
gdzie <math>t</math> jest dowolną liczbą całkowitą. Po podstawieniu dostajemy natychmiast
  
z łatwością otrzymujemy
+
::<math>y - y_0 = - a t</math>
  
::<math>(1 + 1)^n = \sum_{k = 0}^{n} \binom{n}{k} = 2^n</math>
+
Co kończy dowód.<br/>
 +
&#9633;
 +
{{\Spoiler}}
  
::<math>(1 - 1)^n = \sum_{k = 0}^{n} (- 1)^k \binom{n}{k} = 0</math>
 
  
Obliczając sumę i&nbsp;różnicę powyższych wzorów mamy
 
  
::<math>\sum_{k = 0}^{n} \binom{n}{k} (1 + (- 1)^k) = 2 \underset{k \; \text{parzyste}}{\sum^n_{k = 0}} \binom{n}{k} = 2^n</math>
+
<span style="font-size: 110%; font-weight: bold;">Przykład C77</span><br/>
 +
Rozwiązania równania
  
::<math>\sum_{k = 0}^{n} \binom{n}{k} (1 - (- 1)^k) = 2 \underset{k \; \text{nieparzyste}}{\sum_{k = 1}^{n}} \binom{n}{k} = 2^n</math>
+
::<math>a x + b y = c</math>
  
Skąd natychmiast wynika
+
gdzie <math>\gcd (a, b) = 1</math>, które omówiliśmy w poprzednim twierdzeniu, najłatwiej znaleźć korzystając w PARI/GP z funkcji <code>gcdext(a, b)</code>. Funkcja ta zwraca wektor liczb <code>[x<sub>0</sub>, y<sub>0</sub>, d]</code>, gdzie <math>d = \gcd (a, b)</math>, a liczby <math>x_0</math> i <math>y_0</math> są rozwiązaniami równania
  
::<math>\underset{k \; \text{parzyste}}{\sum_{k = 0}^{n}} \binom{n}{k} = 2^{n - 1}</math>
+
::<math>a x_0 + b y_0 = \gcd (a, b)</math>
  
::<math>\underset{k \; \text{nieparzyste}}{\sum_{k = 1}^{n}} \binom{n}{k} = 2^{n - 1}</math>
+
Ponieważ założyliśmy, że <math>\gcd (a, b) = 1</math>, to łatwo zauważmy, że
  
Co należało pokazać.<br/>
+
::<math>a(c x_0) + b (c y_0) = c</math>
&#9633;
 
{{\Spoiler}}
 
  
 +
Zatem para liczb całkowitych <math>(c x_0, c y_0)</math> jest jednym z rozwiązań równania
  
 +
::<math>a x + b y = c</math>
  
 +
i wszystkie pozostałe rozwiązania uzyskujemy ze wzorów
  
 +
::<math>x = c x_0 + b t</math>
  
=== <span style="border-bottom:1px solid #000;">Funkcje <span style="font-size: 95%; background-color: #f8f9fa"><tt>digits(m, b)</tt></span> oraz <span style="font-size: 95%; background-color: #f8f9fa"><tt>issquare(m)</tt></span></span> ===
+
::<math>y = c y_0 - a t</math>
  
&nbsp;
+
Niech <math>a = 7</math> i <math>b = 17</math>. Funkcja <code>gcdext(7,17)</code> zwraca wektor <code>[5, -2, 1]</code>, zatem rozwiązaniami równania <math>7 x + 17 y = 1</math> są liczby
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L47</span><br/>
+
::<math>x = 5 + 17 t</math>
W funkcji <code>modLucas()</code> wykorzystaliśmy zaimplementowaną w&nbsp;PARI/GP funkcję
 
  
<code>digits(m, b)</code> – zwraca wektor cyfr liczby <math>| m |</math> w&nbsp;systemie liczbowym o&nbsp;podstawie <math>b</math>
+
::<math>y = - 2 - 7 t</math>
  
W naszym przypadku potrzebowaliśmy uzyskać wektor cyfr liczby <math>m</math> w&nbsp;układzie dwójkowym, czyli funkcję <code>digits(m, 2)</code> . Wprowadzenie tej funkcji pozwoliło zwiększyć czytelność kodu, ale bez trudu możemy ją sami napisać. Zauważmy, że do zapisania liczby <math>m \geqslant 1</math> potrzebujemy <math>\log_2 m + 1</math> cyfr. Zastępując funkcję <math>\log_2 m</math> funkcją <math>\left \lfloor \tfrac{\log m}{\log 2} \right \rfloor</math> musimy liczyć się z&nbsp;możliwym błędem zaokrąglenia – dlatego w&nbsp;programie deklarujemy wektor <code>V</code> o&nbsp;długości <code>floor( log(m)/log(2) ) + 2</code>. Zwracany wektor <code>W</code> ma już prawidłową długość.
+
A rozwiązaniami równania <math>7 x + 17 y = 10</math> liczby
  
<span style="font-size: 90%; color:black;">Dec2Bin(m) =
+
::<math>x = 50 + 17 t</math>
\\ zwraca wektor cyfr liczby m w układzie dwójkowym
 
{
 
'''local'''(i, k, V, W);
 
'''if'''( m == 0, '''return'''([0]) );
 
V = '''vector'''( '''floor'''( '''log'''(m)/'''log'''(2) ) + 2 ); \\ potrzeba floor( log(m)/log(2) ) + 1, ale błąd zaokrąglenia może zepsuć wynik
 
k = 0;
 
'''while'''( m > 0,
 
        V[k++] = m % 2;
 
        m = '''floor'''(m / 2);
 
      );
 
W = '''vector'''(k);
 
'''for'''(i = 1, k, W[i] = V[k + 1 - i]);
 
'''return'''(W);
 
}
 
  
 +
::<math>y = - 20 - 7 t</math>
  
  
<span style="font-size: 110%; font-weight: bold;">Uwaga L48</span><br/>
 
W funkcjach <code>LucasTest()</code> i <code>StrongLucasTest()</code> wykorzystaliśmy zaimplementowaną w&nbsp;PARI/GP funkcję
 
  
<code>issquare(m)</code> – sprawdza, czy liczba <math>m</math> jest liczbą kwadratową
 
  
Wprowadzenie tej funkcji pozwoliło zwiększyć czytelność kodu, ale bez trudu możemy ją sami napisać. Potrzebna nam będzie funkcja, która znajduje całość z&nbsp;pierwiastka z&nbsp;liczby <math>m</math>, czyli <math>\left\lfloor \sqrt{m} \right\rfloor</math>. Wykorzystamy tutaj ciąg
 
  
::<math>a_{k + 1} =
 
  \begin{cases}
 
  \qquad \;\; 1 & \text{gdy } k = 0 \\
 
      \tfrac{1}{2} \left( a_k + \tfrac{x}{a_k} \right) & \text{gdy } k > 0
 
  \end{cases}</math>
 
  
którego granicą jest <math>\sqrt{x}</math> <ref name="pierwiastek1"/>.
 
  
Modyfikując powyższą definicję tak, aby operacje były zawsze wykonywane na liczbach całkowitych<ref name="IntegerSquareRoot1"/>
 
  
::<math>a_{k + 1} =
 
  \begin{cases}
 
  \qquad \quad \; 1 & \text{gdy } k = 0 \\
 
      \left\lfloor \tfrac{1}{2} \left( a_k + \left\lfloor \tfrac{m}{a_k} \right\rfloor \right) \right\rfloor & \text{gdy } k > 0
 
  \end{cases}</math>
 
  
otrzymujemy ciąg, którego wszystkie wyrazy, począwszy od pewnego skończonego <math>n_0</math>, są równe <math>\left\lfloor \sqrt{m} \right\rfloor</math>. Nie dotyczy to przypadku, gdy <math>m + 1</math> jest liczbą kwadratową, wtedy, począwszy od pewnego skończonego <math>n_0</math>, wyrazy ciągu przyjmują na zmianę wartości <math>\left\lfloor \sqrt{m} \right\rfloor</math> oraz <math>\left\lfloor \sqrt{m} \right\rfloor + 1</math>.
 
  
Na tej podstawie możemy w&nbsp;PARI/GP napisać funkcję
 
  
<span style="font-size: 90%; color:black;">intSqrt(m) =
 
{
 
'''local'''(a, b);
 
'''if'''( m == 0, '''return'''(0) );
 
a = 2^( '''floor'''( '''log'''(m)/'''log'''(2)/2 ) + 2 ); \\ musi być a > sqrt(m)
 
b = '''floor'''(( a + '''floor'''( m/a ) )/2);
 
'''while'''( b < a,
 
        a = b;
 
        b = '''floor'''( ( a + '''floor'''(m/a) )/2 );
 
      );
 
'''return'''(a);
 
}</span>
 
  
Oczywiście liczba <math>m</math> jest liczbą kwadratową, wtedy i&nbsp;tylko wtedy, gdy <math>m = \left\lfloor \sqrt{m} \right\rfloor^2</math>, zatem wystarczy sprawdzić, czy <code>m == intSqrt(m)^2</code>.
 
  
  
 +
== Przypisy ==
 +
<references>
  
 +
<ref name="WellOrdering">Korzystamy w&nbsp;tym momencie z&nbsp;zasady dobrego uporządkowania zbioru liczb naturalnych, która stwierdza, że każdy niepusty podzbiór zbioru liczb naturalnych zawiera element najmniejszy. ([https://pl.wikipedia.org/wiki/Zasada_dobrego_uporz%C4%85dkowania Wiki-pl]), ([https://en.wikipedia.org/wiki/Well-ordering_principle Wiki-en])</ref>
  
 +
<ref name="LiczbaJestPostaci">Określenie, że „liczba <math>n</math> jest postaci <math>a k + b</math>”, jest jedynie bardziej czytelnym (obrazowym) zapisem stwierdzenia, że reszta z&nbsp;dzielenia liczby <math>n</math> przez <math>a</math> wynosi <math>b</math>. Zapis „liczba <math>n</math> jest postaci <math>a k - 1</math>” oznacza, że reszta z&nbsp;dzielenia liczby <math>n</math> przez <math>a</math> wynosi <math>a - 1</math>.</ref>
  
 +
<ref name="Linnik1">Wikipedia, ''Linnik's theorem'', ([https://en.wikipedia.org/wiki/Linnik%27s_theorem Wiki-en])</ref>
  
 +
<ref name="Linnik2">MathWorld, ''Linnik's Theorem''. ([https://mathworld.wolfram.com/LinniksTheorem.html MathWorld])</ref>
  
 +
<ref name="Linnik3">Yuri Linnik, ''On the least prime in an arithmetic progression. I. The basic theorem'', Mat. Sb. (N.S.) 15 (1944) 139–178.</ref>
  
 +
<ref name="Linnik4">Yuri Linnik, ''On the least prime in an arithmetic progression. II. The Deuring-Heilbronn phenomenon'', Mat. Sb. (N.S.) 15 (1944) 347–368.</ref>
  
 +
<ref name="Xylouris1">Triantafyllos Xylouris, ''Über die Nullstellen der Dirichletschen L-Funktionen und die kleinste Primzahl in einer arithmetischen Progression'', Bonner Mathematische Schriften, vol. 404, Univ. Bonn, 2011, Diss.</ref>
  
 +
<ref name="PAPWiki">Wikipedia, ''Primes in arithmetic progression'', ([https://en.wikipedia.org/wiki/Primes_in_arithmetic_progression Wiki-en])</ref>
  
 +
<ref name="PAPMathWorld">MathWorld, ''Prime Arithmetic Progression'', ([https://mathworld.wolfram.com/PrimeArithmeticProgression.html LINK])</ref>
  
 +
<ref name="Corput">J. G. van der Corput, ''Über Summen von Primzahlen und Primzahlquadraten'', Mathematische Annalen, 116 (1939) 1-50, ([https://eudml.org/doc/159991 LINK])</ref>
  
 +
<ref name="largestPAP">Wikipedia, ''Largest known primes in AP'', ([https://en.wikipedia.org/wiki/Primes_in_arithmetic_progression#Largest_known_primes_in_AP Wiki-en])</ref>
  
== Przypisy ==
+
<ref name="GeenTao">Ben Green and Terence Tao, ''The Primes Contain Arbitrarily Long Arithmetic Progressions.'', Ann. of Math. (2) 167 (2008), 481-547, ([https://annals.math.princeton.edu/2008/167-2/p03 LINK1]), Preprint. 8 Apr 2004, ([http://arxiv.org/abs/math.NT/0404188 LINK2])</ref>
  
<references>
+
<ref name="CPAP1">Wikipedia, ''Primes in arithmetic progression - Largest known consecutive primes in AP'', ([https://en.wikipedia.org/wiki/Primes_in_arithmetic_progression#Largest_known_consecutive_primes_in_AP Wiki-en])</ref>
  
<ref name="BaillieWagstaff1">Robert Baillie and Samuel S. Wagstaff Jr., ''Lucas Pseudoprimes'', Mathematics of Computation Vol. 35, No. 152 (1980), ([http://mpqs.free.fr/LucasPseudoprimes.pdf LINK])</ref>
+
<ref name="PrimesInInterval">Henryk Dąbrowski, ''Twierdzenie Czebyszewa o&nbsp;liczbie pierwszej między n i 2n - Uwagi do twierdzenia'', ([https://henryk-dabrowski.pl/index.php?title=Twierdzenie_Czebyszewa_o_liczbie_pierwszej_mi%C4%99dzy_n_i_2n#Uwagi_do_twierdzenia LINK])</ref>
  
<ref name="Arnault1">François Arnault, ''The Rabin-Monier Theorem for Lucas Pseudoprimes'', Mathematics of Computation Vol. 66, No. 218 (1997)</ref>
+
</references>
  
<ref name="pierwiastek1">Wikipedia, ''Pierwiastek kwadratowy'', ([https://pl.wikipedia.org/wiki/Metody_obliczania_pierwiastka_kwadratowego#Metoda_babilo%C5%84ska Wiki-pl]), ([https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method Wiki-en])</ref>
 
  
<ref name="IntegerSquareRoot1">Wikipedia, ''Integer square root'', ([https://en.wikipedia.org/wiki/Integer_square_root#Using_only_integer_division Wiki-en])</ref>
 
  
<ref name="BPSW1">Wikipedia, ''Baillie–PSW primality test'', ([https://en.wikipedia.org/wiki/Baillie%E2%80%93PSW_primality_test Wiki-en])</ref>
 
  
<ref name="BPSW2">MathWorld, ''Baillie-PSW Primality Test'', ([https://mathworld.wolfram.com/Baillie-PSWPrimalityTest.html LINK])</ref>
 
  
</references>
 
  
  

Wersja z 15:02, 19 maj 2023

12.03.2022



Ciągi nieskończone

Definicja C1
Niech [math]\displaystyle{ n \in \mathbb{Z}_+ }[/math]. Jeżeli każdej liczbie [math]\displaystyle{ n }[/math] przypiszemy pewną liczbę rzeczywistą [math]\displaystyle{ a_n }[/math], to powiemy, że liczby [math]\displaystyle{ a_1, a_2, \ldots, a_n, \ldots }[/math] tworzą ciąg nieskończony.


Uwaga C2
Ciąg nieskończony [math]\displaystyle{ a_1, a_2, \ldots, a_n, \ldots }[/math] będziemy oznaczać [math]\displaystyle{ (a_n) }[/math]. Często, o ile nie będzie prowadziło to do nieporozumień, ciąg nieskończony będziemy nazywać po prostu ciągiem.


Definicja C3
Niech [math]\displaystyle{ n \in \mathbb{Z}_+ }[/math]. Ciąg [math]\displaystyle{ (a_n) }[/math] będziemy nazywali

  • ciągiem rosnącym, jeżeli dla każdego [math]\displaystyle{ n }[/math] jest [math]\displaystyle{ a_{n + 1} \geqslant a_n }[/math]
  • ciągiem malejącym, jeżeli dla każdego [math]\displaystyle{ n }[/math] jest [math]\displaystyle{ a_{n + 1} \leqslant a_n }[/math]

Ciągi rosnące dzielimy na

  • ciągi silnie rosnące, jeżeli dla każdego [math]\displaystyle{ n }[/math] jest [math]\displaystyle{ a_{n + 1} \gt a_n }[/math]
  • ciągi słabo rosnące, jeżeli istnieją takie [math]\displaystyle{ n }[/math], że [math]\displaystyle{ a_{n + 1} = a_n }[/math]

Ciągi malejące dzielimy na

  • ciągi silnie malejące, jeżeli dla każdego [math]\displaystyle{ n }[/math] jest [math]\displaystyle{ a_{n + 1} \lt a_n }[/math]
  • ciągi słabo malejące, jeżeli istnieją takie [math]\displaystyle{ n }[/math], że [math]\displaystyle{ a_{n + 1} = a_n }[/math]


Definicja C4
Niech [math]\displaystyle{ \varepsilon \in \mathbb{R}_+ }[/math]. Liczbę [math]\displaystyle{ a }[/math] będziemy nazywali granicą ciągu [math]\displaystyle{ (a_n) }[/math], jeżeli dla dowolnego [math]\displaystyle{ \varepsilon }[/math] w przedziale [math]\displaystyle{ (a - \varepsilon, a + \varepsilon) }[/math] znajdują się prawie wszystkie wyrazy ciągu [math]\displaystyle{ (a_n) }[/math] (to znaczy wszystkie poza co najwyżej skończoną ilością).


Uwaga C5
1) sens definicji jest taki: jeżeli liczba [math]\displaystyle{ a }[/math] jest granicą ciągu [math]\displaystyle{ (a_n) }[/math], to dla dowolnie małego [math]\displaystyle{ \varepsilon \gt 0 }[/math], poza przedziałem [math]\displaystyle{ (a - \varepsilon, a + \varepsilon) }[/math] może się znaleźć co najwyżej skończona ilość wyrazów ciągu [math]\displaystyle{ (a_n) }[/math]

2) słabsze żądanie, aby w przedziale [math]\displaystyle{ (a - \varepsilon, a + \varepsilon) }[/math] znajdowała się nieskończona ilość wyrazów ciągu nie prowadzi do poprawnej definicji granicy. Przykładowo, w przedziale [math]\displaystyle{ (1 - \varepsilon, 1 + \varepsilon) }[/math] znajduje się nieskończenie wiele wyrazów ciągu [math]\displaystyle{ a_n = (-1)^n }[/math], ale ani liczba [math]\displaystyle{ 1 }[/math], ani liczba [math]\displaystyle{ - 1 }[/math] nie są granicami tego ciągu. O ciągu [math]\displaystyle{ a_n = (- 1)^n }[/math] mówimy, że nie ma granicy.

3) ze względu na równoważność warunków

  • [math]\displaystyle{ \quad a_n \in (a - \varepsilon, a + \varepsilon) }[/math]
  • [math]\displaystyle{ \quad a - \varepsilon \lt a_n \lt a + \varepsilon }[/math]
  • [math]\displaystyle{ \quad - \varepsilon \lt a_n - a \lt \varepsilon }[/math]
  • [math]\displaystyle{ \quad | a_n - a | \lt \varepsilon }[/math]

definicja C4 może być wypowiedziana następująco


Definicja C6
Liczbę [math]\displaystyle{ a }[/math] będziemy nazywali granicą ciągu [math]\displaystyle{ (a_n) }[/math], jeżeli dla dowolnego [math]\displaystyle{ \varepsilon \gt 0 }[/math] prawie wszystkie wyrazy ciągu [math]\displaystyle{ (a_n) }[/math] spełniają warunek [math]\displaystyle{ |a_n - a| \lt \varepsilon }[/math].


Definicja C7
Ciąg [math]\displaystyle{ (a_n) }[/math] mający granicę (w rozumieniu definicji C4 lub C6) będziemy nazywali ciągiem zbieżnym, a fakt ten zapisujemy symbolicznie następująco

[math]\displaystyle{ \lim_{n \to \infty} a_n = a }[/math]      lub      [math]\displaystyle{ a_n \longrightarrow a }[/math]

(od łacińskiego słowa limes oznaczającego granicę).


Zauważmy jeszcze, że wprost z definicji granicy wynika
Twierdzenie C8

1. [math]\displaystyle{ \quad \lim_{n \to \infty} a_n = a \quad \iff \quad \lim_{n \to \infty} (a_n - a) = 0 \quad \iff \quad \lim_{n \to \infty} | a_n - a | = 0 }[/math]
2. [math]\displaystyle{ \quad \lim_{n \to \infty} a_n = 0 \quad \iff \quad \lim_{n \to \infty} | a_n | = 0 }[/math]
3. [math]\displaystyle{ \quad \lim_{n \to \infty} a_n = a \quad \implies \quad \lim_{n \to \infty} | a_n | = | a | }[/math]
Dowód

Punkt 1.
Prawdziwość twierdzenia wynika ze względu na identyczność warunków, które muszą spełniać prawie wszystkie wyrazy ciągu

[math]\displaystyle{ | a_n - a | \lt \varepsilon \quad \iff \quad | (a_n - a) - 0 | \lt \varepsilon \quad \iff \quad \big|| a_n - a | - 0 \big| \lt \varepsilon }[/math]

Punkt 2.
Jest to jedynie szczególny przypadek punktu 1. dla [math]\displaystyle{ a = 0 }[/math].

Punkt 3.
Dla dowolnych liczb [math]\displaystyle{ x, y \in \mathbb{R} }[/math] prawdziwa jest nierówność

[math]\displaystyle{ \big|| x | - | y | \big| \leqslant |x - y| }[/math]

Wynika stąd, że jeżeli dla prawie wszystkich wyrazów ciągu [math]\displaystyle{ (a_n) }[/math] spełniona jest nierówność [math]\displaystyle{ |a_n - a| \lt \varepsilon }[/math], to tym bardziej prawdą jest, że [math]\displaystyle{ \big|| a_n | - | a |\big| \lt \varepsilon }[/math]


Twierdzenie C9 (twierdzenie o trzech ciągach)
Jeżeli istnieje taka liczba całkowita [math]\displaystyle{ N_0 }[/math], że dla każdego [math]\displaystyle{ n \gt N_0 }[/math] jest spełniony warunek

[math]\displaystyle{ a_n \leqslant x_n \leqslant b_n }[/math]

oraz

[math]\displaystyle{ \lim_{n \to \infty} a_n = \lim_{n \to \infty} b_n = g }[/math]

to [math]\displaystyle{ \lim_{n \to \infty} x_n = g }[/math].

Dowód

Niech [math]\displaystyle{ \varepsilon }[/math] będzie dowolną, ustaloną liczbą większą od [math]\displaystyle{ 0 }[/math]. Z założenia prawie wszystkie wyrazy ciągu [math]\displaystyle{ (a_n) }[/math] spełniają warunek [math]\displaystyle{ |a_n - g| \lt \varepsilon }[/math]. Możemy założyć, że są to wszystkie wyrazy, poczynając od wyrazu [math]\displaystyle{ N_a }[/math]. Podobnie prawie wszystkie wyrazy ciągu [math]\displaystyle{ (b_n) }[/math] spełniają warunek [math]\displaystyle{ |b_n - g| \lt \varepsilon }[/math] i podobnie możemy założyć, że są to wszystkie wyrazy, poczynając od wyrazu [math]\displaystyle{ N_b }[/math]

Nierówność [math]\displaystyle{ a_n \leqslant x_n \leqslant b_n }[/math] jest spełniona dla wszystkich wyrazów, poczynając od [math]\displaystyle{ N_0 }[/math], zatem oznaczając przez [math]\displaystyle{ M }[/math] największą z liczb [math]\displaystyle{ N_a }[/math], [math]\displaystyle{ N_b }[/math], [math]\displaystyle{ N_0 }[/math], możemy napisać, że o ile [math]\displaystyle{ n \gt M }[/math], to spełnione są jednocześnie nierówności

  • [math]\displaystyle{ \quad g - \varepsilon \lt a_n \lt g + \varepsilon\ }[/math]
  • [math]\displaystyle{ \quad g - \varepsilon \lt b_n \lt g + \varepsilon\ }[/math]
  • [math]\displaystyle{ \quad a_n \leqslant x_n \leqslant b_n }[/math]

Z powyższych nierówności wynika natychmiast następujący ciąg nierówności

[math]\displaystyle{ g - \varepsilon \lt a_n \leqslant x_n \leqslant b_n \lt g + \varepsilon }[/math]

Co oznacza, że dla [math]\displaystyle{ n \gt M }[/math] zachodzi

[math]\displaystyle{ g - \varepsilon \lt x_n \lt g + \varepsilon }[/math]

Czyli prawie wszystkie wyrazy ciągu [math]\displaystyle{ (x_n) }[/math] spełniają warunek [math]\displaystyle{ |x_n - g| \lt \varepsilon }[/math]. Co kończy dowód.


Bez dowodu podamy kilka ważnych twierdzeń.
Twierdzenie C10*
Jeżeli istnieje taka liczba całkowita [math]\displaystyle{ n }[/math] i rzeczywista [math]\displaystyle{ M }[/math], że dla każdego [math]\displaystyle{ k \gt n }[/math] jest

[math]\displaystyle{ a_{k + 1}\geqslant a_k \qquad }[/math] oraz [math]\displaystyle{ \qquad a_k \leqslant M }[/math]

to ciąg [math]\displaystyle{ (a_k) }[/math] jest zbieżny.
Inaczej mówiąc: ciąg rosnący i ograniczony od góry jest zbieżny.


Twierdzenie C11*
Jeżeli istnieje taka liczba całkowita [math]\displaystyle{ n }[/math] i rzeczywista [math]\displaystyle{ M }[/math], że dla każdego [math]\displaystyle{ k \gt n }[/math] jest

[math]\displaystyle{ a_{k + 1} \leqslant a_k \qquad }[/math] oraz [math]\displaystyle{ \qquad a_k \geqslant M }[/math]

to ciąg [math]\displaystyle{ (a_k) }[/math] jest zbieżny.
Inaczej mówiąc: ciąg malejący i ograniczony od dołu jest zbieżny.


Twierdzenie C12*
Jeżeli [math]\displaystyle{ \lim_{n \to \infty} a_n = a }[/math] oraz [math]\displaystyle{ \lim_{n \to \infty} b_n = b }[/math], gdzie [math]\displaystyle{ a, b }[/math] są dowolnymi liczbami rzeczywistymi, to

  1. [math]\displaystyle{ \quad \lim_{n \to \infty} (a_n \pm b_n) = a \pm b }[/math]
  2. [math]\displaystyle{ \quad \lim_{n \to \infty} (a_n \cdot b_n) = a \cdot b }[/math]

Jeżeli dodatkowo dla każdego [math]\displaystyle{ n }[/math] jest [math]\displaystyle{ b_n \neq 0 }[/math] i [math]\displaystyle{ b \neq 0 }[/math], to

  3. [math]\displaystyle{ \quad \lim_{n \to \infty} \frac{a_n}{b_n} = \frac{a}{b} }[/math]


Twierdzenie C13
Jeżeli [math]\displaystyle{ \lim_{n \to \infty} a_n = 0 }[/math], zaś ciąg [math]\displaystyle{ (x_n) }[/math] jest ograniczony, czyli istnieje taka liczba [math]\displaystyle{ M \gt 0 }[/math], że dla każdej wartości [math]\displaystyle{ n }[/math] prawdziwa jest nierówność [math]\displaystyle{ | x_n | \lt M }[/math], to

[math]\displaystyle{ \lim_{n \to \infty} (x_n \cdot a_n) = 0 }[/math]
Dowód

Wystarczy pokazać, że (zobacz twierdzenie C8 p.2)

[math]\displaystyle{ \lim_{n \to \infty} |x_n \cdot a_n| = 0 }[/math]

Z założenia prawdziwe jest oszacowanie

[math]\displaystyle{ 0 \leqslant |x_n \cdot a_n| \leqslant |a_n| \cdot M }[/math]

Zatem z twierdzenia o trzech ciągach otrzymujemy natychmiast, że

[math]\displaystyle{ \lim_{n \to \infty} |x_n \cdot a_n| = 0 }[/math]

Co kończy dowód.


Twierdzenie C14
Dla [math]\displaystyle{ a \geqslant 0 }[/math] i [math]\displaystyle{ n \geqslant 1 }[/math] prawdziwa jest nierówność

[math]\displaystyle{ (1 + a)^{1 / n} \leqslant 1 + \frac{a}{n} }[/math]
Dowód

Wzór jest prawdziwy dla [math]\displaystyle{ a = 0 }[/math]. Zakładając, że [math]\displaystyle{ a \gt 0 }[/math] i korzystając ze wzoru dwumianowego, mamy dla [math]\displaystyle{ n \geqslant 1 }[/math]

[math]\displaystyle{ \left( 1 + \frac{a}{n} \right)^n = \sum_{k=0}^{n}\left [\binom{n}{k} \cdot \left ( \frac{a}{n} \right )^k \right ] \geqslant }[/math]
[math]\displaystyle{ \;\; \geqslant \sum_{k=0}^{1}\left [\binom{n}{k} \cdot \left ( \frac{a}{n} \right )^k \right ] = }[/math]
[math]\displaystyle{ \;\; = 1 + n \cdot \frac{a}{n} = }[/math]
[math]\displaystyle{ \;\; = 1 + a }[/math]

Co należało pokazać.


Twierdzenie C15
Jeżeli [math]\displaystyle{ A \gt 0 }[/math], to [math]\displaystyle{ \lim_{n \to \infty} \sqrt[n]{A} = 1 }[/math].

Dowód

Dla [math]\displaystyle{ A \gt 1 }[/math] możemy napisać [math]\displaystyle{ A = 1 + a }[/math], gdzie [math]\displaystyle{ a \gt 0 }[/math], wtedy z twierdzenia C14 otrzymujemy

[math]\displaystyle{ 1 \lt \sqrt[n]{A} = (1 + a)^{1 / n} \leqslant 1 + \frac{a}{n} }[/math]

Z twierdzenia o trzech ciągach dostajemy natychmiast (dla [math]\displaystyle{ A \gt 1 }[/math])

[math]\displaystyle{ \lim_{n \to \infty} \sqrt[n]{A} = 1 }[/math]

W przypadku gdy [math]\displaystyle{ 0 \lt A \lt 1 }[/math], możemy napisać [math]\displaystyle{ A = \frac{1}{B} }[/math], gdzie [math]\displaystyle{ B \gt 1 }[/math], wtedy ze względu na udowodniony wyżej rezultat [math]\displaystyle{ \lim_{n \to \infty} \sqrt[n]{B} = 1 }[/math]

[math]\displaystyle{ \lim_{n \to \infty} \sqrt[n]{A} = \lim_{n \to \infty} \frac{1}{\sqrt[n]{B}} = \frac{1}{\underset{n \rightarrow \infty}{\lim} \sqrt[n]{B}} = 1 }[/math]

Jeżeli [math]\displaystyle{ A = 1 }[/math], to [math]\displaystyle{ \sqrt[n]{A} = 1 }[/math] dla każdego [math]\displaystyle{ n \geqslant 1 }[/math]. Co kończy dowód.


Twierdzenie C16
Jeżeli prawie wszystkie wyrazy ciągu ciągu [math]\displaystyle{ (a_n) }[/math] spełniają warunek [math]\displaystyle{ 0 \lt m \lt a_n \lt M }[/math], to [math]\displaystyle{ \lim_{n \to \infty} \sqrt[n]{a_n} = 1 }[/math]

Dowód

Z założenia dla prawie wszystkich wyrazów ciągu [math]\displaystyle{ (a_n) }[/math] jest

[math]\displaystyle{ 0 \lt m \leqslant a_n \leqslant M }[/math]

Zatem dla prawie wszystkich wyrazów ciągu [math]\displaystyle{ a_n }[/math] mamy

[math]\displaystyle{ \sqrt[n]{m} \leqslant \sqrt[n]{a_n} \leqslant \sqrt[n]{M} }[/math]

Z twierdzenia C15 wiemy, że [math]\displaystyle{ \lim_{n \to \infty} \sqrt[n]{m} = \lim_{n \to \infty} \sqrt[n]{M} = 1 }[/math], zatem na podstawie twierdzenia o trzech ciągach otrzymujemy natychmiast [math]\displaystyle{ \lim_{n \to \infty} \sqrt[n]{a_n} = 1 }[/math]


Twierdzenie C17
Następujące ciągi są silnie rosnące i zbieżne

Dowód

Punkt 1
W twierdzeniu A6 pokazaliśmy, że ciąg

[math]\displaystyle{ a_n = \left( 1 + \frac{1}{n} \right)^n }[/math]

jest silnie rosnący i ograniczony od góry. Zatem z twierdzenia C10 wynika, że jest zbieżny. Liczbę będącą granicą tego ciągu oznaczamy literą [math]\displaystyle{ e }[/math], jest ona podstawą logarytmu naturalnego.

Punkt 2
Pokażemy najpierw, że ciąg [math]\displaystyle{ \left( 1 - \frac{1}{n} \right)^n }[/math] jest silnie rosnący. Musimy pokazać, że prawdziwa jest nierówność

[math]\displaystyle{ \left( 1 - \frac{1}{n + 1} \right)^{n + 1} \gt \left( 1 - \frac{1}{n} \right)^n }[/math]

Łatwo sprawdzamy prawdziwość nierówności dla [math]\displaystyle{ n = 1 }[/math]. Załóżmy teraz, że [math]\displaystyle{ n \geqslant 2 }[/math]. Przekształcając,

[math]\displaystyle{ \left( \frac{n}{n + 1} \right)^{n + 1} \gt \left( \frac{n - 1}{n} \right)^n }[/math]
[math]\displaystyle{ \frac{n}{n + 1} \cdot \left( \frac{n}{n + 1} \right)^n \cdot \left( \frac{n}{n - 1} \right)^n \gt 1 }[/math]
[math]\displaystyle{ \left( \frac{n^2}{n^2 - 1} \right)^n \gt \frac{n + 1}{n} }[/math]

otrzymujemy nierówność równoważną,

[math]\displaystyle{ \left( 1 + \frac{1}{n^2 - 1} \right)^n \gt 1 + \frac{1}{n} }[/math]

którą już łatwo udowodnić, bo

[math]\displaystyle{ \left( 1 + \frac{1}{n^2 - 1} \right)^n \gt \left( 1 + \frac{1}{n^2} \right)^n = \sum_{k = 0}^{n} \binom{n}{k} \cdot \left( \frac{1}{n^2} \right)^k \gt \sum_{k = 0}^{1} \binom{n}{k} \cdot \frac{1}{n^{2k}} = 1 + \frac{1}{n} }[/math]

Ponieważ dla każdego [math]\displaystyle{ n \geqslant 1 }[/math] jest [math]\displaystyle{ \left( 1 - \frac{1}{n} \right)^n \leqslant 1 }[/math] (bo iloczyn liczb mniejszych od [math]\displaystyle{ 1 }[/math] nie może być liczbą większą do jedności), to z twierdzenia C10 wynika, że ciąg ten jest zbieżny. Zatem możemy napisać

[math]\displaystyle{ \underset{n \rightarrow \infty}{\lim} \left( 1 - \frac{1}{n} \right)^n = g }[/math]

Rozważmy teraz iloczyn wypisanych w twierdzeniu ciągów

[math]\displaystyle{ \left( 1 + \frac{1}{n} \right)^n \cdot \left( 1 - \frac{1}{n} \right)^n = \left( 1 - \frac{1}{n^2} \right)^n = \left[ \left( 1 - \frac{1}{n^2} \right)^{n^2} \right]^{1 / n} }[/math]

Łatwo widzimy, że ciąg [math]\displaystyle{ \left( 1 - \frac{1}{n^2} \right)^{n^2} }[/math] jest podciągiem ciągu [math]\displaystyle{ \left( 1 - \frac{1}{n} \right)^n }[/math], zatem jest ograniczony i dla [math]\displaystyle{ n \geqslant 2 }[/math] spełniony jest układ nierówności

[math]\displaystyle{ 0 \lt \left( \frac{3}{4} \right)^4 \leqslant \left( 1 - \frac{1}{n^2} \right)^{n^2} \leqslant 1 }[/math]

Z twierdzenia C16 dostajemy

[math]\displaystyle{ \lim_{n \to \infty} \left[ \left( 1 - \frac{1}{n^2} \right)^{n^2} \right]^{1 / n} = 1 }[/math]

Z twierdzenia C12 p. 2 wynika natychmiast, że

[math]\displaystyle{ e \cdot g = \lim_{n \to \infty} \left[ \left( 1 + \frac{1}{n} \right)^n \cdot \left( 1 - \frac{1}{n} \right)^n \right] = \lim_{n \to \infty} \left[ \left( 1 - \frac{1}{n^2} \right)^{n^2} \right]^{1 / n} = 1 }[/math]

Zatem [math]\displaystyle{ g = \frac{1}{e} }[/math].


Twierdzenie C18
Dla [math]\displaystyle{ n \geqslant 2 }[/math] prawdziwe są następujące nierówności

Dowód

Ponieważ ciąg [math]\displaystyle{ \left( 1 + \frac{1}{n} \right)^n }[/math] jest silnie rosnący, to

[math]\displaystyle{ \left( 1 + \frac{1}{n} \right)^n \lt e }[/math]

Logarytmując powyższą nierówność, mamy

[math]\displaystyle{ n \cdot \log \left( 1 + \frac{1}{n} \right) \lt 1 }[/math]

Stąd wynika natychmiast, że

[math]\displaystyle{ \log \left( 1 + \frac{1}{n} \right) \lt \frac{1}{n} }[/math]


Ponieważ ciąg [math]\displaystyle{ \left( 1 - \frac{1}{n} \right)^n }[/math] również jest silnie rosnący, to postępując analogicznie, dostajemy

[math]\displaystyle{ \left( 1 - \frac{1}{n} \right)^n \lt \frac{1}{e} }[/math]
[math]\displaystyle{ n \cdot \log \left( 1 - \frac{1}{n} \right) \lt - 1 }[/math]
[math]\displaystyle{ \log \left( 1 - \frac{1}{n} \right) \lt - \frac{1}{n} }[/math]


Przekształcając otrzymane wzory, otrzymujemy

[math]\displaystyle{ - \log \left( 1 + \frac{1}{n} \right) = - \log \left( \frac{n + 1}{n} \right) = \log \left( \frac{n}{n + 1} \right) = \log \left( 1 - \frac{1}{n + 1} \right) \lt - \frac{1}{n + 1} }[/math]

oraz

[math]\displaystyle{ - \log \left( 1 - \frac{1}{n} \right) = - \log \left( \frac{n - 1}{n} \right) = \log \left( \frac{n}{n - 1} \right) = \log \left( 1 + \frac{1}{n - 1} \right) \lt \frac{1}{n - 1} }[/math]



Liczby pierwsze w ciągach arytmetycznych

Twierdzenie C19
Każda liczba naturalna [math]\displaystyle{ n \geqslant 2 }[/math] jest liczbą pierwszą lub iloczynem liczb pierwszych.

Dowód

Pierwszy sposób

Przypuśćmy, że istnieją liczby naturalne większe od [math]\displaystyle{ 1 }[/math], które nie są liczbami pierwszymi ani nie są iloczynami liczb pierwszych. Niech [math]\displaystyle{ m }[/math] oznacza najmniejszą[1] z takich liczb. Z założenia [math]\displaystyle{ m }[/math] nie jest liczbą pierwszą, zatem [math]\displaystyle{ m }[/math] może być zapisana w postaci [math]\displaystyle{ m = a \cdot b }[/math], gdzie liczby [math]\displaystyle{ a, b }[/math] są liczbami naturalnymi mniejszymi od [math]\displaystyle{ m }[/math].

Ponieważ [math]\displaystyle{ m }[/math] jest najmniejszą liczbą naturalną, która nie jest liczbą pierwszą ani nie jest iloczynem liczb pierwszych, to liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] muszą być liczbami złożonymi, ale jako mniejsze od [math]\displaystyle{ m }[/math] są one iloczynami liczb pierwszych, zatem i liczba [math]\displaystyle{ m }[/math] musi być iloczynem liczb pierwszych.

Uzyskana sprzeczność dowodzi, że nasze przypuszczenie jest fałszywe.


Drugi sposób

Indukcja matematyczna. Twierdzenie jest oczywiście prawdziwe dla [math]\displaystyle{ n = 2 }[/math]. Zakładając, że twierdzenie jest prawdziwe dla wszystkich liczb naturalnych [math]\displaystyle{ k \in [2, n] }[/math], dla liczby [math]\displaystyle{ n + 1 }[/math] mamy dwie możliwości

  • [math]\displaystyle{ n + 1 }[/math] jest liczbą pierwszą (wtedy twierdzenie jest prawdziwe w sposób oczywisty)
  • [math]\displaystyle{ n + 1 }[/math] jest liczbą złożoną wtedy, [math]\displaystyle{ n + 1 = a b }[/math], gdzie [math]\displaystyle{ 1 \lt a, b \lt n + 1 }[/math]; zatem na podstawie założenia indukcyjnego liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] są liczbami pierwszymi lub iloczynami liczb pierwszych, czyli [math]\displaystyle{ n + 1 = a b }[/math] jest iloczynem liczb pierwszych.

Co należało pokazać.


Twierdzenie C20 (Euklides, IV w. p.n.e.)
Istnieje nieskończenie wiele liczb pierwszych.

Dowód

Przypuśćmy, że istnieje jedynie skończona ilość liczb pierwszych [math]\displaystyle{ p_1, p_2, \ldots, p_n }[/math] . Wtedy liczba [math]\displaystyle{ a = p_1 \cdot p_2 \cdot \ldots \cdot p_n + 1 }[/math] jest większa od jedności i z twierdzenia C19 wynika, że posiada dzielnik będący liczbą pierwszą, ale jak łatwo zauważyć żadna z liczb pierwszych [math]\displaystyle{ p_1, p_2, \ldots, p_n }[/math] nie jest dzielnikiem liczby [math]\displaystyle{ a }[/math]. Zatem istnieje liczba pierwsza [math]\displaystyle{ p }[/math] będąca dzielnikiem pierwszym liczby [math]\displaystyle{ a }[/math] i różna od każdej z liczb [math]\displaystyle{ p_1, p_2, \ldots, p_n }[/math]. Co kończy dowód.


Twierdzenie C21
Jeżeli liczba naturalna [math]\displaystyle{ n }[/math] jest postaci [math]\displaystyle{ 4 k + 3 }[/math][2], to ma dzielnik postaci [math]\displaystyle{ 4 k + 3 }[/math] będący liczbą pierwszą.

Dowód

Jeżeli [math]\displaystyle{ n }[/math] jest liczbą pierwszą, to twierdzenie jest dowiedzione. Zbadajmy zatem sytuację gdy [math]\displaystyle{ n }[/math] jest liczbą złożoną. Z założenia [math]\displaystyle{ n }[/math] jest liczbą nieparzystą, zatem możliwe są trzy typy iloczynów

[math]\displaystyle{ (4 a + 1) (4 b + 1) = 16 a b + 4 a + 4 b + 1 = 4 (4 a b + a + b) + 1 }[/math]
[math]\displaystyle{ (4 a + 1) (4 b + 3) = 16 a b + 12 a + 4 b + 3 = 4 (4 a b + 3 a + b) + 3 }[/math]
[math]\displaystyle{ (4 a + 3) (4 b + 3) = 16 a b + 12 a + 12 b + 9 = 4 (4 a b + 3 a + 3 b + 2) + 1 }[/math]

Widzimy, że liczba złożona postaci [math]\displaystyle{ 4 k + 3 }[/math] jest iloczynem liczb postaci [math]\displaystyle{ 4 k + 1 }[/math] i [math]\displaystyle{ 4 k + 3 }[/math]. Wynika stąd natychmiast, że liczba złożona postaci [math]\displaystyle{ 4 k + 3 }[/math] posiada dzielnik postaci [math]\displaystyle{ 4 k + 3 }[/math]. Niech [math]\displaystyle{ q }[/math] oznacza najmniejszy dzielnik liczby [math]\displaystyle{ n }[/math] postaci [math]\displaystyle{ 4 k + 3 }[/math]. Pokażemy, że [math]\displaystyle{ q }[/math] jest liczbą pierwszą. Istotnie, gdyby [math]\displaystyle{ q }[/math] była liczbą złożoną, to miałaby dzielnik [math]\displaystyle{ d }[/math] postaci [math]\displaystyle{ 4 k + 3 }[/math] i byłoby [math]\displaystyle{ d \lt q }[/math], wbrew założeniu, że [math]\displaystyle{ q }[/math] jest najmniejszym dzielnikiem liczby [math]\displaystyle{ n }[/math] postaci [math]\displaystyle{ 4 k + 3 }[/math]. Co kończy dowód.


Twierdzenie C22
Istnieje nieskończenie wiele liczb pierwszych postaci [math]\displaystyle{ 4 k + 3 }[/math].

Dowód

Przypuśćmy, że istnieje tylko skończona ilość liczb pierwszych postaci [math]\displaystyle{ 4 k + 3 }[/math]. Niech będą to liczby [math]\displaystyle{ p_1, \ldots, p_s }[/math]. Liczba

[math]\displaystyle{ M = 4 p_1 \cdot \ldots \cdot p_s - 1 = 4 (p_1 \cdot \ldots \cdot p_s - 1) + 3 }[/math]

jest postaci [math]\displaystyle{ 4 k + 3 }[/math] i jak wiemy z twierdzenia C21, ma dzielnik pierwszy [math]\displaystyle{ q }[/math] postaci [math]\displaystyle{ 4 k + 3 }[/math]. Ale jak łatwo zauważyć, żadna z liczb [math]\displaystyle{ p_1, \ldots, p_s }[/math] nie dzieli liczby [math]\displaystyle{ M }[/math]. Zatem istnieje liczba pierwsza [math]\displaystyle{ q }[/math] postaci [math]\displaystyle{ 4 k + 3 }[/math] różna od każdej z liczb [math]\displaystyle{ p_1, p_2, \ldots, p_s }[/math]. Otrzymana sprzeczność kończy dowód.


Twierdzenie C23
Jeżeli liczba naturalna [math]\displaystyle{ n }[/math] jest postaci [math]\displaystyle{ 6 k + 5 }[/math], to ma dzielnik postaci [math]\displaystyle{ 6 k + 5 }[/math] będący liczbą pierwszą.

Dowód

Jeżeli [math]\displaystyle{ n }[/math] jest liczbą pierwszą, to twierdzenie jest dowiedzione. Zbadajmy sytuację gdy [math]\displaystyle{ n }[/math] jest liczbą złożoną. Z twierdzenia C19 wiemy, że w tym przypadku liczba [math]\displaystyle{ n }[/math] będzie iloczynem liczb pierwszych. Zauważmy, że nieparzyste liczby pierwsze mogą być jedynie postaci [math]\displaystyle{ 6 k + 1 }[/math] lub [math]\displaystyle{ 6 k + 5 }[/math] (liczba [math]\displaystyle{ 6 k + 3 }[/math] jest liczbą złożoną). Ponieważ iloczyn liczb postaci [math]\displaystyle{ 6 k + 1 }[/math]

[math]\displaystyle{ (6 a + 1) (6 b + 1) = 36 a b + 6 a + 6 b + 1 = 6 (6 a b + a + b) + 1 }[/math]

jest liczbą postaci [math]\displaystyle{ 6 k + 1 }[/math], to w rozkładzie liczby [math]\displaystyle{ n }[/math] na czynniki pierwsze musi pojawić się przynajmniej jeden czynnik postaci [math]\displaystyle{ 6 k + 5 }[/math]. Co kończy dowód.


Twierdzenie C24
Istnieje nieskończenie wiele liczb pierwszych postaci [math]\displaystyle{ 6 k + 5 }[/math].

Dowód

Przypuśćmy, że istnieje tylko skończona ilość liczb pierwszych postaci [math]\displaystyle{ 6 k + 5 }[/math]. Niech będą to liczby [math]\displaystyle{ p_1, \ldots, p_s }[/math]. Liczba

[math]\displaystyle{ M = 6 p_1 \cdot \ldots \cdot p_s - 1 = 6 (p_1 \cdot \ldots \cdot p_s - 1) + 5 }[/math]

jest postaci [math]\displaystyle{ 6 k + 5 }[/math] i jak wiemy z twierdzenia C23 ma dzielnik pierwszy [math]\displaystyle{ q }[/math] postaci [math]\displaystyle{ 6 k + 5 }[/math]. Ale jak łatwo zauważyć żadna z liczb [math]\displaystyle{ p_1, \ldots, p_s }[/math] nie dzieli liczby [math]\displaystyle{ M }[/math]. Zatem istnieje liczba pierwsza [math]\displaystyle{ q }[/math] postaci [math]\displaystyle{ 6 k + 5 }[/math] różna od każdej z liczb [math]\displaystyle{ p_1, p_2, \ldots, p_s }[/math]. Otrzymana sprzeczność kończy dowód.


Twierdzenie C25
Istnieje nieskończenie wiele liczb pierwszych postaci [math]\displaystyle{ 3 k + 2 }[/math].

Dowód

Jeżeli [math]\displaystyle{ k = 2 j }[/math] jest liczbą parzystą, to otrzymujemy ciąg liczb parzystych

[math]\displaystyle{ 3 k + 2 = 6 j + 2 }[/math]

w którym jedynie liczba [math]\displaystyle{ 2 }[/math] jest liczbą pierwszą (dla [math]\displaystyle{ j = 0 }[/math]).

Jeżeli [math]\displaystyle{ k = 2 j + 1 }[/math] jest liczbą nieparzystą, to otrzymujemy ciąg liczb nieparzystych

[math]\displaystyle{ 3 k + 2 = 3 (2 j + 1) + 2 = 6 j + 5 }[/math]

o którym wiemy, że zawiera nieskończenie wiele liczb pierwszych (zobacz twierdzenie C24). Zatem w ciągu arytmetycznym postaci [math]\displaystyle{ 3 k + 2 }[/math] występuje nieskończenie wiele liczb pierwszych.


Uwaga C26
Zauważmy, że liczby postaci [math]\displaystyle{ 2 k + 1 }[/math] to wszystkie liczby nieparzyste dodatnie. Ponieważ wszystkie liczby pierwsze (poza liczbą [math]\displaystyle{ 2 }[/math]) są liczbami nieparzystymi, to wśród liczb postaci [math]\displaystyle{ 2 k + 1 }[/math] występuje nieskończenie wiele liczb pierwszych.

Wszystkie omówione wyżej przypadki ciągów arytmetycznych: [math]\displaystyle{ 2 k + 1 }[/math], [math]\displaystyle{ 3 k + 2 }[/math], [math]\displaystyle{ 4 k + 3 }[/math] i [math]\displaystyle{ 6 k + 5 }[/math], w których występuje nieskończona ilość liczb pierwszych są szczególnymi przypadkami udowodnionego w 1837 roku twierdzenia


Twierdzenie C27* (Peter Gustav Lejeune Dirichlet, 1837)
Niech [math]\displaystyle{ a \in \mathbb{Z}_+ }[/math] i [math]\displaystyle{ b \in \mathbb{Z} }[/math]. Jeżeli liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] są względnie pierwsze, to w ciągu arytmetycznym [math]\displaystyle{ a k + b }[/math] występuje nieskończenie wiele liczb pierwszych.


Uwaga C28
Dowód twierdzenia Dirichleta jest bardzo trudny. Natomiast bardzo łatwo można pokazać, że dowolny ciąg arytmetyczny [math]\displaystyle{ a k + b }[/math] zawiera nieskończenie wiele liczb złożonych. Istotnie, jeżeli liczby [math]\displaystyle{ a, b }[/math] nie są względnie pierwsze, to wszystkie wyrazy ciągu są liczbami złożonymi. Jeżeli [math]\displaystyle{ a, b }[/math] są względnie pierwsze i [math]\displaystyle{ b \gt 1 , }[/math] to wystarczy przyjąć [math]\displaystyle{ k = b t }[/math]. Jeżeli są względnie pierwsze i [math]\displaystyle{ b = 1 }[/math], to wystarczy przyjąć [math]\displaystyle{ k = a t^2 + 2 t }[/math], wtedy

[math]\displaystyle{ a k + 1 = a^2 t^2 + 2 a t + 1 = (a t + 1)^2 }[/math]


Uwaga C29
Wiemy już, że w przypadku gdy liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] są względnie pierwsze, to w ciągu arytmetycznym [math]\displaystyle{ a k + b }[/math] występuje nieskończenie wiele liczb pierwszych. Pojawia się pytanie o to, czy możliwe jest oszacowanie najmniejszej liczby pierwszej [math]\displaystyle{ p }[/math] w takim ciągu. Jakkolwiek przypuszczamy, że prawdziwe jest oszacowanie [math]\displaystyle{ p \lt a^2 }[/math], to stan naszej obecnej wiedzy ujmuje twierdzenie Linnika[3][4][5][6], które podajemy niżej. Trzeba było ponad pół wieku wysiłku wielu matematyków, aby pokazać, że w twierdzeniu Linnika możemy przyjąć [math]\displaystyle{ L = 5 }[/math][7].


Twierdzenie C30* (Jurij Linnik, 1944)
Niech [math]\displaystyle{ a, b \in \mathbb{Z}_+ }[/math] i [math]\displaystyle{ p_{\min} (a, b) }[/math] oznacza najmniejszą liczbę pierwszą w ciągu arytmetycznym [math]\displaystyle{ a k + b }[/math], gdzie [math]\displaystyle{ k \in \mathbb{Z}_+ }[/math]. Jeżeli [math]\displaystyle{ \gcd (a, b) = 1 }[/math] i [math]\displaystyle{ b \in [1, a - 1] }[/math], to istnieją takie stałe [math]\displaystyle{ L \gt 0 }[/math] i [math]\displaystyle{ a_0 \geqslant 2 }[/math], że dla wszystkich [math]\displaystyle{ a \gt a_0 }[/math] prawdziwe jest oszacowanie

[math]\displaystyle{ p_{\min} (a, b) \lt a^L }[/math]


Zadanie C31
Pokazać, że istnieje nieskończenie wiele liczb pierwszych zakończonych cyframi 99, przykładowo 199, 499, 599, 1399, 1499, ...

Rozwiązanie

Wszystkie liczby naturalne zakończone cyframi [math]\displaystyle{ 99 }[/math] możemy zapisać w postaci [math]\displaystyle{ a_n = 100 k + 99 }[/math], gdzie [math]\displaystyle{ k \in \mathbb{N} }[/math]. Ponieważ ciąg [math]\displaystyle{ (a_n) }[/math] jest ciągiem arytmetycznym, a liczby [math]\displaystyle{ 99 }[/math] i [math]\displaystyle{ 100 }[/math] są względnie pierwsze, to na podstawie twierdzenia Dirichleta stwierdzamy, że istnieje nieskończenie wiele liczb pierwszych zakończonych cyframi [math]\displaystyle{ 99 }[/math].


Definicja C32
Niech [math]\displaystyle{ a \geqslant 2 }[/math] będzie liczbą całkowitą. Wartość funkcji [math]\displaystyle{ \pi(n; a, b) }[/math] jest równa ilości liczb pierwszych nie większych od [math]\displaystyle{ n }[/math], które przy dzieleniu przez [math]\displaystyle{ a }[/math] dają resztę [math]\displaystyle{ b }[/math].


Uwaga C33
Zauważmy, że w twierdzeniu Dirichleta na liczby [math]\displaystyle{ a }[/math] oraz [math]\displaystyle{ b }[/math] nałożone są minimalne warunki: [math]\displaystyle{ a \in \mathbb{Z}_+ }[/math] i [math]\displaystyle{ b \in \mathbb{Z} }[/math]. Sytuacja w przypadku funkcji [math]\displaystyle{ \pi (n ; a, b) }[/math] jest odmienna – tutaj mamy [math]\displaystyle{ a \geqslant 2 }[/math] oraz [math]\displaystyle{ 0 \leqslant b \leqslant a - 1 }[/math]. Jest tak dlatego, że podział liczb pierwszych, który odzwierciedla funkcja [math]\displaystyle{ \pi (n ; a, b) }[/math] jest podziałem pierwotnym, a twierdzenie Dirichleta jest tylko jego uzasadnieniem. Podział liczb pierwszych musi być też precyzyjnie określony, tak aby zachodził naturalny związek

[math]\displaystyle{ \sum_{b = 0}^{a - 1} \pi (n ; a, b) = \pi (n) }[/math]

Oczywiście nie przeszkadza to w liczeniu liczb pierwszych w dowolnym ciągu arytmetycznym. Niech na przykład

[math]\displaystyle{ u_k = 7 k + 101 = 7 (k + 14) + 3 \qquad }[/math] gdzie [math]\displaystyle{ k = 0, 1, \ldots }[/math]

Ilość liczb pierwszych w ciagu [math]\displaystyle{ (u_k) }[/math] jest równa

[math]\displaystyle{ \pi (n ; 7, 3) - \pi (7 \cdot 13 + 3 ; 7, 3) = \pi (n ; 7, 3) - 5 }[/math]


Zadanie C34
Pokazać, że dla dowolnej liczby całkowitej [math]\displaystyle{ m \geqslant 1 }[/math]

  • wśród liczb naturalnych zawsze można wskazać [math]\displaystyle{ m }[/math] kolejnych liczb, które są złożone
  • w ciągu arytmetycznym [math]\displaystyle{ a k + b }[/math], gdzie liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] są względnie pierwsze, zawsze można wskazać [math]\displaystyle{ m }[/math] kolejnych wyrazów, które są złożone
Rozwiązanie

Punkt 1.
W przypadku liczb naturalnych, łatwo widzimy, że kolejne liczby

[math]\displaystyle{ (m + 1) ! + 2, \quad (m + 1) ! + 3, \quad \ldots, \quad (m + 1) ! + (m + 1) }[/math]

są liczbami złożonymi. Co oznacza, że dla dowolnej liczby naturalnej [math]\displaystyle{ m }[/math] zawsze możemy wskazać taką liczbę [math]\displaystyle{ n }[/math], że [math]\displaystyle{ p_{n + 1} - p_n \gt m }[/math].

Punkt 2.
W przypadku ciągu arytmetycznego [math]\displaystyle{ u_k = a k + b }[/math] rozważmy kolejne wyrazy ciągu począwszy od wskaźnika

[math]\displaystyle{ k_0 = \prod^{m - 1}_{j = 0} (a j + b) }[/math]

Łatwo zauważamy, że dla [math]\displaystyle{ k = k_0, k_0 + 1, \ldots, k_0 + (m - 1) }[/math] wyrazy ciągu arytmetycznego [math]\displaystyle{ u_k = a k + b }[/math] są liczbami złożonymi. Istotnie, niech [math]\displaystyle{ t = 0, 1, \ldots, m - 1 }[/math] wtedy

[math]\displaystyle{ u_k = a k + b = }[/math]
[math]\displaystyle{ \! = a (k_0 + t) + b = }[/math]
[math]\displaystyle{ \! = a k_0 + (a t + b) = }[/math]
[math]\displaystyle{ \! = a \prod^{m - 1}_{j = 0} (a j + b) + (a t + b) }[/math]

i liczba [math]\displaystyle{ a t + b }[/math] dzieli iloczyn [math]\displaystyle{ \prod^{m - 1}_{j = 0} (a j + b) }[/math] dla [math]\displaystyle{ t = 0, \ldots, m - 1 }[/math]. Co należało pokazać.

Wiemy, że jeżeli liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] są względnie pierwsze, to w ciągu [math]\displaystyle{ a k + b }[/math] występuje nieskończenie wiele liczb pierwszych. Niech będą to liczby [math]\displaystyle{ q_1, q_2, \ldots, q_r, \ldots }[/math]. Uzyskany rezultat oznacza, że dla dowolnej liczby naturalnej [math]\displaystyle{ m }[/math] zawsze możemy wskazać taką liczbę [math]\displaystyle{ n }[/math], że [math]\displaystyle{ q_{n + 1} - q_n \geqslant a (m + 1) }[/math]


Przykład C35
Rozważmy ciąg arytmetyczny [math]\displaystyle{ u_k = 3 k + 2 }[/math] i wskaźnik

[math]\displaystyle{ k_0 = \prod^{12}_{j = 0} (3 j + 2) = 3091650738176000 }[/math]

Trzynaście wyrazów tego szeregu dla [math]\displaystyle{ k = k_0 + t }[/math], gdzie [math]\displaystyle{ t = 0, 1, \ldots, 12 }[/math] to oczywiście liczby złożone, ale wyrazy dla [math]\displaystyle{ k = k_0 - 1 }[/math] i [math]\displaystyle{ k = k_0 + 13 }[/math] są liczbami pierwszymi.

Przeszukując ciąg [math]\displaystyle{ u_k = 3 k + 2 }[/math] możemy łatwo znaleźć, że pierwsze trzynaście kolejnych wyrazów złożonych pojawia się już dla [math]\displaystyle{ k = 370, 371, \ldots, 382 }[/math].


Twierdzenie C36
Jeżeli [math]\displaystyle{ n \geqslant 3 }[/math], to istnieje [math]\displaystyle{ n }[/math] kolejnych liczb naturalnych, wśród których znajduje się dokładnie [math]\displaystyle{ r \leqslant \pi (n) }[/math] liczb pierwszych.

Dowód

Warunek [math]\displaystyle{ n \geqslant 3 }[/math] nie wynika z potrzeb dowodu, a jedynie pomija sytuacje nietypowe, których twierdzenie nie obejmuje. Zawsze istnieje jedna liczba naturalna, która jest liczbą pierwszą i łatwo możemy wskazać dwie kolejne liczby naturalne będące liczbami pierwszymi.

Niech [math]\displaystyle{ k \in \mathbb{N} }[/math]. Wartość funkcji

[math]\displaystyle{ Q(k, n) = \pi (k + n) - \pi (k) }[/math]

jest równa ilości liczb pierwszych wśród [math]\displaystyle{ n }[/math] kolejnych liczb naturalnych od liczby [math]\displaystyle{ k + 1 }[/math] do liczby [math]\displaystyle{ k + n }[/math].

Uwzględniając, że wypisane niżej wyrażenia w nawiasach kwadratowych mogą przyjmować jedynie dwie wartości [math]\displaystyle{ 0 }[/math] lub [math]\displaystyle{ 1 }[/math], dostajemy

  • [math]\displaystyle{ \biggl| Q (k + 1, n) - Q (k, n) \biggr| = \biggl| \bigl[\pi (k + n + 1) - \pi (k + n) \bigr] - \bigl[\pi (k + 1) - \pi (k) \bigr] \biggr| \leqslant 1 }[/math]

Ponadto mamy

  • [math]\displaystyle{ Q(0, n) = \pi (n) \qquad }[/math] bo [math]\displaystyle{ \pi (0) = 0 }[/math]
  • [math]\displaystyle{ Q((n + 1) ! + 1, n) = 0 \qquad }[/math] bo liczby [math]\displaystyle{ (n + 1) ! + 2, \ldots, (n + 1) ! + (n + 1) }[/math] są liczbami złożonymi

Ponieważ wartości funkcji [math]\displaystyle{ Q(k, n) }[/math] mogą zmieniać się tylko o [math]\displaystyle{ - 1 }[/math], [math]\displaystyle{ 0 }[/math] lub [math]\displaystyle{ 1 }[/math], to [math]\displaystyle{ Q(k, n) }[/math] musi przyjmować wszystkie wartości całkowite od [math]\displaystyle{ 0 }[/math] do [math]\displaystyle{ \pi (n) }[/math]. Wynika stąd, że istnieje taka liczba [math]\displaystyle{ k_r }[/math], że [math]\displaystyle{ Q(k_r, n) = r }[/math], gdzie [math]\displaystyle{ 0 \leqslant r \leqslant \pi (n) }[/math].


C Q10.png

Fragment wykresu funkcji [math]\displaystyle{ Q(k, 10) }[/math]. Widzimy, że dla [math]\displaystyle{ k = 113 }[/math] po raz pierwszy mamy [math]\displaystyle{ Q(k, 10) = 0 }[/math], a funkcja [math]\displaystyle{ Q(k, 10) }[/math] przyjmuje wszystkie wartości całkowite od [math]\displaystyle{ 0 }[/math] do [math]\displaystyle{ 5 }[/math].


Przykład C37
Czytelnik może łatwo sprawdzić, że ciąg [math]\displaystyle{ ( 1308, \ldots, 1407 ) }[/math] stu kolejnych liczb całkowitych zawiera dokładnie [math]\displaystyle{ 8 }[/math] liczb pierwszych.


Zadanie C38
Pokazać, nie korzystając z twierdzenia C36, że istnieje [math]\displaystyle{ 1000 }[/math] kolejnych liczb naturalnych, wśród których jest dokładnie jedna liczba pierwsza.

Rozwiązanie

Zauważmy, że [math]\displaystyle{ 1000 }[/math] kolejnych liczb naturalnych

[math]\displaystyle{ 1001! + 2, 1001! + 3, \ldots, 1001! + 1001 }[/math]

nie zawiera żadnej liczby pierwszej. Wielokrotnie zmniejszając wszystkie wypisane wyżej liczby o jeden, aż do chwili, gdy pierwsza z wypisanych liczb będzie liczbą pierwszą uzyskamy [math]\displaystyle{ 1000 }[/math] kolejnych liczb naturalnych, wśród których jest dokładnie jedna liczba pierwsza.

Uwaga: dopiero liczba [math]\displaystyle{ 1001! - 1733 }[/math] jest pierwsza.


Zadanie C39
Pokazać, że istnieje [math]\displaystyle{ 20 }[/math] kolejnych liczb naturalnych postaci [math]\displaystyle{ 6 k + 1 }[/math], wśród których jest dokładnie [math]\displaystyle{ 5 }[/math] liczb pierwszych.

Rozwiązanie

Rozwiązywanie zadania rozpoczniemy od dwóch spostrzeżeń

  • wśród pierwszych [math]\displaystyle{ 20 }[/math] liczb naturalnych postaci [math]\displaystyle{ 6 k + 1 }[/math] jest [math]\displaystyle{ 13 }[/math] liczb pierwszych
  • w ciągu [math]\displaystyle{ 6 k + 1 }[/math] istnieją dowolnie długie przedziały pozbawione liczb pierwszych (zobacz zadanie C34), zatem istnieje [math]\displaystyle{ 20 }[/math] kolejnych liczb naturalnych postaci [math]\displaystyle{ 6 k + 1 }[/math], wśród których nie ma ani jednej liczby pierwszej

Pierwsze spostrzeżenie pokazuje, że rozwiązanie problemu jest potencjalnie możliwe. Rozwiązanie mogłoby nie istnieć, gdybyśmy szukali [math]\displaystyle{ 20 }[/math] liczb naturalnych postaci [math]\displaystyle{ 6 k + 1 }[/math] wśród których jest, powiedzmy, [math]\displaystyle{ 15 }[/math] liczb pierwszych.

Drugie spostrzeżenie mówi nam, że ilość liczb pierwszych wśród kolejnych [math]\displaystyle{ 20 }[/math] liczb naturalnych postaci [math]\displaystyle{ 6 k + 1 }[/math] zmienia się od [math]\displaystyle{ 13 }[/math] do [math]\displaystyle{ 0 }[/math]. Analiza przebiegu tych zmian jest kluczem do dowodu twierdzenia.


Zbadajmy zatem, jak zmienia się ilość liczb pierwszych wśród kolejnych [math]\displaystyle{ 20 }[/math] liczb naturalnych postaci [math]\displaystyle{ 6 k + 1 }[/math]. Rozważmy ciąg [math]\displaystyle{ a_k = 6 k + 1 }[/math], gdzie [math]\displaystyle{ k = 0, 1, 2, \ldots }[/math]

[math]\displaystyle{ (a_k) = (1, \mathbf{7}, \mathbf{13}, \mathbf{19}, 25, \mathbf{31}, \mathbf{37}, \mathbf{43}, 49, 55, \mathbf{61}, \mathbf{67}, \mathbf{73}, \mathbf{79}, 85, 91, \mathbf{97}, \mathbf{103}, \mathbf{109}, 115, 121, \mathbf{127}, 133, \mathbf{139}, 145, \mathbf{151}, \mathbf{157}, \mathbf{163}, 169, 175, \mathbf{181}, 187, \mathbf{193}, \mathbf{199}, 205, \mathbf{211}, \ldots) }[/math]

Liczby pierwsze zostały pogrubione.


Niech [math]\displaystyle{ (B^n) }[/math] będzie fragmentem ciągu [math]\displaystyle{ (a_k) }[/math] rozpoczynającym się od [math]\displaystyle{ n }[/math]-tego wyrazu ciągu i złożonym z [math]\displaystyle{ 20 }[/math] kolejnych wyrazów ciągu [math]\displaystyle{ (a_k) }[/math]. Przykładowo mamy

[math]\displaystyle{ (B^1) = (1, \mathbf{7}, \mathbf{13}, \mathbf{19}, 25, \mathbf{31}, \mathbf{37}, \mathbf{43}, 49, 55, \mathbf{61}, \mathbf{67}, \mathbf{73}, \mathbf{79}, 85, 91, \mathbf{97}, \mathbf{103}, \mathbf{109}, 115 ) }[/math]

[math]\displaystyle{ (B^2) = ( \mathbf{7}, \mathbf{13}, \mathbf{19}, 25, \mathbf{31}, \mathbf{37}, \mathbf{43}, 49, 55, \mathbf{61}, \mathbf{67}, \mathbf{73}, \mathbf{79}, 85, 91, \mathbf{97}, \mathbf{103}, \mathbf{109}, 115, 121 ) }[/math]

[math]\displaystyle{ (B^3) = ( \mathbf{13}, \mathbf{19}, 25, \mathbf{31}, \mathbf{37}, \mathbf{43}, 49, 55, \mathbf{61}, \mathbf{67}, \mathbf{73}, \mathbf{79}, 85, 91, \mathbf{97}, \mathbf{103}, \mathbf{109}, 115, 121, \mathbf{127} ) }[/math]


Musimy zrozumieć, jak przejście od ciągu [math]\displaystyle{ (B^n) }[/math] do ciągu [math]\displaystyle{ (B^{n + 1}) }[/math] wpływa na ilość liczb pierwszych w tych ciągach.

  • jeżeli najmniejszy wyraz ciągu [math]\displaystyle{ (B^n) }[/math] jest liczbą złożoną, to po przejściu do ciągu [math]\displaystyle{ (B^{n + 1}) }[/math] ilość liczb pierwszych w tym ciągu w stosunku do ilości liczb pierwszych w ciągu [math]\displaystyle{ (B^n) }[/math] może
    • pozostać bez zmian (w przypadku, gdy największy wyraz ciągu [math]\displaystyle{ (B^{n + 1}) }[/math] jest liczbą złożoną)
    • zwiększyć się o jeden (w przypadku, gdy największy wyraz ciągu [math]\displaystyle{ (B^{n + 1}) }[/math] jest liczbą pierwszą)
  • jeżeli najmniejszy wyraz ciągu [math]\displaystyle{ (B^n) }[/math] jest liczbą pierwszą, to po przejściu do ciągu [math]\displaystyle{ (B^{n + 1}) }[/math] ilość liczb pierwszych w tym ciągu w stosunku do ilości liczb pierwszych w ciągu [math]\displaystyle{ (B^n) }[/math] może
    • zmniejszyć się o jeden (w przypadku, gdy największy wyraz ciągu [math]\displaystyle{ (B^{n + 1}) }[/math] jest liczbą złożoną)
    • pozostać bez zmian (w przypadku, gdy największy wyraz ciągu [math]\displaystyle{ (B^{n + 1}) }[/math] jest liczbą pierwszą)


Wynika stąd, że przechodząc od ciągu [math]\displaystyle{ (B^n) }[/math] do ciągu [math]\displaystyle{ (B^{n + 1}) }[/math] ilość liczb pierwszych może się zmienić o [math]\displaystyle{ - 1 }[/math], [math]\displaystyle{ 0 }[/math] lub [math]\displaystyle{ 1 }[/math]. Z drugiego ze spostrzeżeń uczynionych na początku dowodu wynika istnienie takiej liczby [math]\displaystyle{ r }[/math], że wśród ciągów

[math]\displaystyle{ (B^1), (B^2), \ldots, (B^r) }[/math]

ilość liczb pierwszych będzie przyjmowała wszystkie możliwe wartości od liczby [math]\displaystyle{ 13 }[/math] do liczby [math]\displaystyle{ 0 }[/math]. Co zapewnia istnienie takich [math]\displaystyle{ 20 }[/math] kolejnych liczb naturalnych postaci [math]\displaystyle{ 6 k + 1 }[/math], że wśród nich jest dokładnie [math]\displaystyle{ 5 }[/math] liczb pierwszych.


Twierdzenie C40
Niech [math]\displaystyle{ a, b \in \mathbb{Z} }[/math] oraz [math]\displaystyle{ a \geqslant 2 }[/math] i [math]\displaystyle{ 0 \leqslant b \leqslant a - 1 }[/math]. Jeżeli liczby [math]\displaystyle{ a }[/math] oraz [math]\displaystyle{ b }[/math] są względnie pierwsze, to istnieje [math]\displaystyle{ n }[/math] kolejnych liczb postaci [math]\displaystyle{ a k + b }[/math], wśród których znajduje się dokładnie [math]\displaystyle{ r \leqslant \pi (a (n - 1) + b ; a, b) }[/math] liczb pierwszych.

Dowód

Twierdzenie można udowodnić uogólniając dowód twierdzenia C36 lub wykorzystując metodę zastosowaną w rozwiązaniu zadania C39.


Zadanie C41
Niech [math]\displaystyle{ p \geqslant 5 }[/math] będzie liczbą pierwszą. Pokazać, że w ciągu [math]\displaystyle{ 6 k + 1 }[/math] występują kwadraty wszystkich liczb pierwszych [math]\displaystyle{ p }[/math].

Rozwiązanie

Wiemy, że liczby pierwsze nieparzyste [math]\displaystyle{ p \geqslant 5 }[/math] mogą być postaci [math]\displaystyle{ 6 k + 1 }[/math] lub [math]\displaystyle{ 6 k + 5 }[/math]. Ponieważ

[math]\displaystyle{ (6 k + 1)^2 = 6 (6 k^2 + 2 k) + 1 }[/math]
[math]\displaystyle{ (6 k + 5)^2 = 6 (6 k^2 + 10 k + 4) + 1 }[/math]

zatem kwadraty liczb pierwszych są postaci [math]\displaystyle{ 6 k + 1 }[/math] i nie mogą występować w ciągu postaci [math]\displaystyle{ 6 k + 5 }[/math].


Zadanie C42
Dany jest ciąg arytmetyczny [math]\displaystyle{ a k + b }[/math], gdzie liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] są względnie pierwsze. Pokazać, że

  • jeżeli liczba pierwsza [math]\displaystyle{ p }[/math] dzieli [math]\displaystyle{ a }[/math], to żaden wyraz ciągu [math]\displaystyle{ a k + b }[/math] nie jest podzielny przez [math]\displaystyle{ p }[/math]
  • jeżeli liczba pierwsza [math]\displaystyle{ p }[/math] nie dzieli [math]\displaystyle{ a }[/math], to istnieje nieskończenie wiele wyrazów ciągu [math]\displaystyle{ a k + b }[/math], które są podzielne przez [math]\displaystyle{ p }[/math]
Rozwiązanie

Punkt 1.
Zauważmy, że liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] są względnie pierwsze, zatem liczba pierwsza [math]\displaystyle{ p }[/math] nie może jednocześnie dzielić liczb [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math]. Ponieważ z założenia [math]\displaystyle{ p|a }[/math], to wynika stąd, że [math]\displaystyle{ p }[/math] nie dzieli [math]\displaystyle{ b }[/math]. Jeśli tak, to

[math]\displaystyle{ a k + b = (n p) k + b }[/math]

i [math]\displaystyle{ p }[/math] nie dzieli żadnej liczby postaci [math]\displaystyle{ a k + b }[/math].

Punkt 2.
Pierwszy sposób

Niech [math]\displaystyle{ k_0 \in \mathbb{N} }[/math]. Przypuśćmy, że dla pewnych różnych liczb naturalnych [math]\displaystyle{ i, j }[/math] takich, że [math]\displaystyle{ 1 \leqslant i \lt j \leqslant p }[/math] liczby [math]\displaystyle{ a(k_0 + i) + b }[/math] oraz [math]\displaystyle{ a(k_0 + j) + b }[/math] dają tę samą resztę przy dzieleniu przez liczbę pierwszą [math]\displaystyle{ p }[/math]. Zatem różnica tych liczb jest podzielna przez [math]\displaystyle{ p }[/math]

[math]\displaystyle{ p| [a (k_0 + j) + b] - [a (k_0 + i) + b] }[/math]

czyli

[math]\displaystyle{ p|a (j - i) }[/math]

Ponieważ [math]\displaystyle{ p \nmid a }[/math] to na mocy lematu Euklidesa (twierdzenie C72), mamy

[math]\displaystyle{ p| (j - i) }[/math]

co jest niemożliwe, bo [math]\displaystyle{ 1 \leqslant j - i \leqslant p - 1 \lt p }[/math].

Zatem reszty [math]\displaystyle{ r_1, r_2, \ldots, r_p }[/math] są wszystkie różne, a ponieważ jest ich [math]\displaystyle{ p }[/math], czyli tyle ile jest różnych reszt z dzielenia przez liczbę [math]\displaystyle{ p }[/math], to zbiór tych reszt jest identyczny ze zbiorem reszt z dzielenia przez [math]\displaystyle{ p }[/math], czyli ze zbiorem [math]\displaystyle{ S = \{ 0, 1, 2, \ldots, p - 1 \} }[/math]. W szczególności wynika stąd, że wśród [math]\displaystyle{ p }[/math] kolejnych wyrazów ciągu arytmetycznego [math]\displaystyle{ a k + b }[/math] jeden z tych wyrazów jest podzielny przez [math]\displaystyle{ p }[/math]. Zatem istnieje nieskończenie wiele wyrazów ciągu [math]\displaystyle{ a k + b }[/math], które są podzielne przez [math]\displaystyle{ p }[/math].


Drugi sposób

Problem sprowadza się do wykazania istnienia nieskończenie wielu par liczb naturalnych [math]\displaystyle{ (k, n) }[/math], takich że

[math]\displaystyle{ a k + b = n p }[/math]

Co z kolei sprowadza się do badania rozwiązań całkowitych równania

[math]\displaystyle{ n p - a k = b }[/math]

Zauważmy, że ponieważ [math]\displaystyle{ p \nmid a }[/math], to liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ p }[/math] są względnie pierwsze. Zatem ich największym wspólnym dzielnikiem jest liczba [math]\displaystyle{ 1 }[/math]. Na mocy twierdzenia C76 równanie to ma nieskończenie wiele rozwiązań w liczbach całkowitych

[math]\displaystyle{ n = n_0 + p t }[/math]
[math]\displaystyle{ k = k_0 + a t }[/math]

gdzie [math]\displaystyle{ t }[/math] jest dowolną liczbą całkowitą, a para liczb [math]\displaystyle{ (n_0, k_0) }[/math] jest dowolnym rozwiązaniem tego równania. Widzimy, że dla dostatecznie dużych liczb [math]\displaystyle{ t }[/math] zawsze możemy uzyskać takie [math]\displaystyle{ n }[/math] i [math]\displaystyle{ k }[/math], że [math]\displaystyle{ n, k \in \mathbb{Z}_+ }[/math]. Pokazaliśmy w ten sposób, że w ciągu arytmetycznym [math]\displaystyle{ a k + b }[/math] istnieje nieskończenie wiele wyrazów podzielnych przez liczbę pierwszą [math]\displaystyle{ p }[/math].


Trzeci sposób

Zauważmy, że ponieważ [math]\displaystyle{ p \nmid a }[/math], to liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ p }[/math] są względnie pierwsze. Zatem ich największym wspólnym dzielnikiem jest liczba [math]\displaystyle{ 1 }[/math]. Lemat Bézouta zapewnia istnienie takich liczb całkowitych [math]\displaystyle{ x }[/math] i [math]\displaystyle{ y }[/math], że

[math]\displaystyle{ a x + p y = 1 }[/math]

Niech [math]\displaystyle{ k_0 = r p - b x }[/math], gdzie [math]\displaystyle{ r }[/math] jest dowolną liczbą całkowitą dodatnią, ale na tyle dużą, aby [math]\displaystyle{ k_0 }[/math] była liczbą dodatnią bez względu na znak iloczynu [math]\displaystyle{ b x }[/math]. Łatwo sprawdzamy, że liczba [math]\displaystyle{ a k_0 + b }[/math] jest podzielna przez [math]\displaystyle{ p }[/math]

[math]\displaystyle{ a k_0 + b = a (r p - b x) + b = }[/math]
[math]\displaystyle{ \;\; = a r p - a b x + b = }[/math]
[math]\displaystyle{ \;\; = a r p + b (1 - a x) = }[/math]
[math]\displaystyle{ \;\; = a r p + b p y = }[/math]
[math]\displaystyle{ \;\; = p (a r + b y) }[/math]

Zatem w ciągu [math]\displaystyle{ a k + b }[/math] istnieje przynajmniej jeden wyraz podzielny przez liczbę pierwszą [math]\displaystyle{ p }[/math]. Jeśli tak, to w ciągu arytmetycznym [math]\displaystyle{ a k + b }[/math] istnieje nieskończenie wiele liczb podzielnych przez [math]\displaystyle{ p }[/math], bo dla [math]\displaystyle{ k = k_0 + s p }[/math], gdzie [math]\displaystyle{ s \in \mathbb{N} }[/math], mamy

[math]\displaystyle{ a k + b = a (k_0 + s p) + b = a s p + (a k_0 + b) }[/math]

Czyli [math]\displaystyle{ p|a k + b }[/math].


Uwaga C43
Łatwo możemy napisać w PARI/GP funkcję, która zwraca najmniejszą liczbę naturalną [math]\displaystyle{ k_0 }[/math], dla której wyraz ciągu arytmetycznego [math]\displaystyle{ a k + b }[/math] jest podzielny przez [math]\displaystyle{ p }[/math] (przy założeniu, że liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ p }[/math] są względnie pierwsze).

f(a,b,p) = lift( Mod(-b,p)*Mod(a,p)^(-1) )



Ciągi nieskończone i liczby pierwsze

Uwaga C44
Choć wiele ciągów jest dobrze znanych i równie dobrze zbadanych, to nie wiemy, czy zawierają one nieskończenie wiele liczb pierwszych. Przykładowo

Nie wiemy, czy istnieje wielomian całkowity [math]\displaystyle{ W(n) }[/math] stopnia większego niż jeden taki, że [math]\displaystyle{ W(n) }[/math] jest liczbą pierwszą dla nieskończenie wielu liczb [math]\displaystyle{ n }[/math].


Przykład C45
Łatwo sprawdzić, że wartości wielomianu [math]\displaystyle{ W(n) = n^2 + n + 41 }[/math] są liczbami pierwszymi dla [math]\displaystyle{ 1 \leqslant n \leqslant 39 }[/math]. Oczywiście [math]\displaystyle{ 41 | W(41) }[/math].


Twierdzenie C46
Niech [math]\displaystyle{ a, n }[/math] będą liczbami całkowitymi takimi, że [math]\displaystyle{ a \geqslant 2 }[/math] i [math]\displaystyle{ n \geqslant 1 }[/math]. Jeżeli liczba [math]\displaystyle{ a^n + 1 }[/math] jest liczbą pierwszą, to [math]\displaystyle{ a }[/math] jest liczbą parzystą i [math]\displaystyle{ n = 2^m }[/math].

Dowód

Gdyby liczba [math]\displaystyle{ a }[/math] była nieparzysta, to [math]\displaystyle{ a^n + 1 \geqslant 4 }[/math] byłoby parzyste i nie mogłoby być liczbą pierwszą.

Niech teraz wykładnik [math]\displaystyle{ n = x y }[/math] będzie liczbą złożoną, zaś [math]\displaystyle{ x }[/math] będzie liczbą nieparzystą. Wtedy

[math]\displaystyle{ a^n + 1 = (a^y)^x + 1 }[/math]

Oznaczając [math]\displaystyle{ b = a^y }[/math] oraz [math]\displaystyle{ x = 2 k + 1 }[/math] mamy

[math]\displaystyle{ a^n + 1 = (a^y)^x + 1 = }[/math]
[math]\displaystyle{ \: = b^x + 1 = }[/math]
[math]\displaystyle{ \: = b^{2 k + 1} + 1 = }[/math]
[math]\displaystyle{ \: = (b + 1) \cdot (b^{2 k} - b^{2 k - 1} + \ldots - b^3 + b^2 - b + 1) }[/math]

Wynika stąd, że w takim przypadku [math]\displaystyle{ a^n + 1 }[/math] jest liczbą złożoną. Zatem wykładnik [math]\displaystyle{ n }[/math] nie może zawierać czynników nieparzystych, czyli musi być [math]\displaystyle{ n = 2^m }[/math]. Co należało pokazać.


Twierdzenie C47
Dla dowolnej liczby naturalnej [math]\displaystyle{ n \geqslant 1 }[/math] liczba [math]\displaystyle{ x - y }[/math] jest dzielnikiem wyrażenia [math]\displaystyle{ x^n - y^n }[/math].

Dowód

Indukcja matematyczna. Twierdzenie jest prawdziwe dla [math]\displaystyle{ n = 1 }[/math], bo [math]\displaystyle{ x - y }[/math] dzieli [math]\displaystyle{ x^1 - y^1 }[/math]. Załóżmy, że [math]\displaystyle{ x - y }[/math] jest dzielnikiem wyrażenia [math]\displaystyle{ x^n - y^n }[/math], czyli [math]\displaystyle{ x^n - y^n = (x - y) \cdot k }[/math], otrzymujemy dla [math]\displaystyle{ n + 1 }[/math]

[math]\displaystyle{ x^{n + 1} - y^{n + 1} = x x^n - y x^n + y x^n - y y^n = }[/math]
[math]\displaystyle{ \quad \, = (x - y) x^n + y (x^n - y^n) = }[/math]
[math]\displaystyle{ \quad \, = (x - y) x^n + y (x - y) \cdot k = }[/math]
[math]\displaystyle{ \quad \, = (x - y) (x^n + y \cdot k) }[/math]

Czyli [math]\displaystyle{ x - y }[/math] jest dzielnikiem [math]\displaystyle{ x^{n + 1} - y^{n + 1} }[/math]. Co kończy dowód indukcyjny.


Twierdzenie C48
Jeżeli [math]\displaystyle{ n \geqslant 2 }[/math] oraz [math]\displaystyle{ a^n - 1 }[/math] jest liczbą pierwszą, to [math]\displaystyle{ a = 2 }[/math] i [math]\displaystyle{ n }[/math] jest liczbą pierwszą.

Dowód

Z twierdzenia C47 wiemy, że [math]\displaystyle{ x - y | x^n - y^n }[/math]. W przypadku gdy [math]\displaystyle{ a \gt 2 }[/math] mamy

[math]\displaystyle{ a - 1 | a^n - 1 }[/math]

Czyli musi być [math]\displaystyle{ a = 2 }[/math]. Z tego samego twierdzenia wynika też, że jeżeli [math]\displaystyle{ n }[/math] jest liczbą złożoną [math]\displaystyle{ n = r s }[/math], to

[math]\displaystyle{ 2^r - 1 | 2^{r s} - 1 }[/math]

bo [math]\displaystyle{ a^r - b^r | (a^r)^s - (b^r)^s }[/math]. Zatem [math]\displaystyle{ n }[/math] musi być liczbą pierwszą. Co kończy dowód.




Ciągi arytmetyczne liczb pierwszych

Uwaga C49
Ciągi arytmetyczne liczb pierwszych[8][9] zbudowane z dwóch liczb pierwszych nie są interesujące, bo dowolne dwie liczby tworzą ciąg arytmetyczny. Dlatego będziemy się zajmowali ciągami arytmetycznymi liczb pierwszych o długości [math]\displaystyle{ n \geqslant 3 }[/math].

Ponieważ nie da się zbudować ciągu arytmetycznego liczb pierwszych o długości [math]\displaystyle{ n \geqslant 3 }[/math], w którym pierwszym wyrazem jest liczba [math]\displaystyle{ p_0 = 2 }[/math], to będą nas interesowały ciągi rozpoczynające się od liczby pierwszej [math]\displaystyle{ p_0 \geqslant 3 }[/math]

Jeżeli do liczby pierwszej nieparzystej dodamy dodatnią liczbę nieparzystą, to otrzymamy liczbę parzystą złożoną, zatem różnica ciągu arytmetycznego [math]\displaystyle{ d }[/math] musi być liczbą parzystą, aby zbudowanie jakiegokolwiek ciągu arytmetycznego liczb pierwszych o długości [math]\displaystyle{ n \geqslant 3 }[/math] było możliwe.

Istnienie nieskończenie wiele ciągów arytmetycznych liczb pierwszych o długości [math]\displaystyle{ n = 3 }[/math] pokazano już wiele lat temu[10]. Temat ciągów arytmetycznych liczb pierwszych zyskał na popularności[11] po udowodnieniu przez Bena Greena i Terence'a Tao twierdzenia o istnieniu dowolnie długich (ale skończonych) ciągów arytmetycznych liczb pierwszych[12].


Twierdzenie C50* (Ben Green i Terence Tao, 2004)
Dla dowolnej liczby naturalnej [math]\displaystyle{ n \geqslant 2 }[/math] istnieje nieskończenie wiele [math]\displaystyle{ n }[/math]-wyrazowych ciągów arytmetycznych liczb pierwszych.



Przykład C51
Tabela zawiera przykładowe ciągi arytmetyczne liczb pierwszych o długości [math]\displaystyle{ n = 3 }[/math] i [math]\displaystyle{ n = 4 }[/math].

Pokaż tabele

W przypadku [math]\displaystyle{ n = 3 }[/math] wyszukiwanie ciągów zostało przeprowadzone dla [math]\displaystyle{ d = 2 k }[/math], gdzie [math]\displaystyle{ 1 \leqslant k \leqslant 100 }[/math] i (przy ustalonym [math]\displaystyle{ d }[/math]) dla kolejnych liczb pierwszych [math]\displaystyle{ p_0 \leqslant 10^8 }[/math].

W przypadku [math]\displaystyle{ n = 4 }[/math] wyszukiwanie ciągów zostało przeprowadzone dla [math]\displaystyle{ d = 6 k }[/math], gdzie [math]\displaystyle{ 1 \leqslant k \leqslant 100 }[/math] i (przy ustalonym [math]\displaystyle{ d }[/math]) dla kolejnych liczb pierwszych [math]\displaystyle{ p_0 \leqslant 10^8 }[/math].

Jeżeli w tabeli jest wypisanych sześć wartości [math]\displaystyle{ p_0 }[/math], to oznacza to, że zostało znalezionych co najmniej sześć wartości [math]\displaystyle{ p_0 }[/math].



Przykład C52
Tabela zawiera przykładowe ciągi arytmetyczne liczb pierwszych o długości [math]\displaystyle{ n = 5 }[/math] i [math]\displaystyle{ n = 6 }[/math].

Pokaż tabele

W przypadku [math]\displaystyle{ n = 5 }[/math] wyszukiwanie ciągów zostało przeprowadzone dla [math]\displaystyle{ d = 6 k }[/math], gdzie [math]\displaystyle{ 1 \leqslant k \leqslant 100 }[/math] i (przy ustalonym [math]\displaystyle{ d }[/math]) dla kolejnych liczb pierwszych [math]\displaystyle{ p_0 \leqslant 10^8 }[/math].

W przypadku [math]\displaystyle{ n = 6 }[/math] wyszukiwanie ciągów zostało przeprowadzone dla [math]\displaystyle{ d = 30 k }[/math], gdzie [math]\displaystyle{ 1 \leqslant k \leqslant 100 }[/math] i (przy ustalonym [math]\displaystyle{ d }[/math]) dla kolejnych liczb pierwszych [math]\displaystyle{ p_0 \leqslant 10^8 }[/math].

Jeżeli w tabeli jest wypisanych sześć wartości [math]\displaystyle{ p_0 }[/math], to oznacza to, że zostało znalezionych co najmniej sześć wartości [math]\displaystyle{ p_0 }[/math].



Przykład C53
Tabela zawiera przykładowe ciągi arytmetyczne liczb pierwszych o długości [math]\displaystyle{ n = 7 }[/math] i [math]\displaystyle{ n = 8 }[/math].

Pokaż tabele

W przypadku [math]\displaystyle{ n = 7 }[/math] wyszukiwanie ciągów zostało przeprowadzone dla [math]\displaystyle{ d = 30 k }[/math], gdzie [math]\displaystyle{ 1 \leqslant k \leqslant 100 }[/math] i (przy ustalonym [math]\displaystyle{ d }[/math]) dla kolejnych liczb pierwszych [math]\displaystyle{ p_0 \leqslant 10^8 }[/math].

W przypadku [math]\displaystyle{ n = 8 }[/math] wyszukiwanie ciągów zostało przeprowadzone dla [math]\displaystyle{ d = 210 k }[/math], gdzie [math]\displaystyle{ 1 \leqslant k \leqslant 100 }[/math] i (przy ustalonym [math]\displaystyle{ d }[/math]) dla kolejnych liczb pierwszych [math]\displaystyle{ p_0 \leqslant 10^8 }[/math].

Jeżeli w tabeli jest wypisanych sześć wartości [math]\displaystyle{ p_0 }[/math], to oznacza to, że zostało znalezionych co najmniej sześć wartości [math]\displaystyle{ p_0 }[/math].



Przykład C54
Tabela zawiera przykładowe ciągi arytmetyczne liczb pierwszych o długości [math]\displaystyle{ n = 9 }[/math] i [math]\displaystyle{ n = 10 }[/math].

Pokaż tabele

W przypadku [math]\displaystyle{ n = 9 }[/math] wyszukiwanie ciągów zostało przeprowadzone dla [math]\displaystyle{ d = 210 k }[/math], gdzie [math]\displaystyle{ 1 \leqslant k \leqslant 100 }[/math] i (przy ustalonym [math]\displaystyle{ d }[/math]) dla kolejnych liczb pierwszych [math]\displaystyle{ p_0 \leqslant 10^9 }[/math].

W przypadku [math]\displaystyle{ n = 10 }[/math] wyszukiwanie ciągów zostało przeprowadzone dla [math]\displaystyle{ d = 210 k }[/math], gdzie [math]\displaystyle{ 1 \leqslant k \leqslant 100 }[/math] i (przy ustalonym [math]\displaystyle{ d }[/math]) dla kolejnych liczb pierwszych [math]\displaystyle{ p_0 \leqslant 10^{10} }[/math].

Jeżeli w tabeli jest wypisanych sześć wartości [math]\displaystyle{ p_0 }[/math], to oznacza to, że zostało znalezionych co najmniej sześć wartości [math]\displaystyle{ p_0 }[/math].



Twierdzenie C55
Niech [math]\displaystyle{ d, k, k_0, n \in \mathbb{Z}_+ }[/math] oraz [math]\displaystyle{ a \in \mathbb{Z} }[/math]. Jeżeli liczby [math]\displaystyle{ d }[/math] i [math]\displaystyle{ n }[/math] są względnie pierwsze, to reszty [math]\displaystyle{ r_1, r_2, \ldots, r_n }[/math] z dzielenia [math]\displaystyle{ n }[/math] kolejnych wyrazów ciągu arytmetycznego

[math]\displaystyle{ x_k = a + k d \qquad }[/math] dla [math]\displaystyle{ \; k = k_0 + 1, \ldots, k_0 + n }[/math]

przez liczbę [math]\displaystyle{ n }[/math] są wszystkie różne i tworzą zbiór [math]\displaystyle{ S = \{ 0, 1, \ldots, n - 1 \} }[/math]. W szczególności wynika stąd, że wśród [math]\displaystyle{ n }[/math] kolejnych wyrazów ciągu arytmetycznego [math]\displaystyle{ (x_k) }[/math] jeden z tych wyrazów jest podzielny przez [math]\displaystyle{ n }[/math].

Dowód

Przypuśćmy, że dla pewnych różnych liczb naturalnych [math]\displaystyle{ i, j }[/math] takich, że [math]\displaystyle{ 1 \leqslant i \lt j \leqslant n }[/math] liczby [math]\displaystyle{ a + (k_0 + i) d }[/math] oraz [math]\displaystyle{ a + (k_0 + j) d }[/math] dają tę samą resztę przy dzieleniu przez [math]\displaystyle{ n }[/math]. Zatem różnica tych liczb jest podzielna przez [math]\displaystyle{ n }[/math]

[math]\displaystyle{ n| [a + (k_0 + j) d] - [a + (k_0 + i) d] }[/math]

Czyli

[math]\displaystyle{ n|d (j - i) }[/math]

Ponieważ liczby [math]\displaystyle{ d }[/math] i [math]\displaystyle{ n }[/math] są względnie pierwsze, to na mocy lematu Euklidesa (twierdzenie C72), mamy

[math]\displaystyle{ n| (j - i) }[/math]

Co jest niemożliwe, bo [math]\displaystyle{ 1 \leqslant j - i \leqslant n - 1 \lt n }[/math].

Zatem reszty [math]\displaystyle{ r_1, r_2, \ldots, r_n }[/math] są wszystkie różne, a ponieważ jest ich [math]\displaystyle{ n }[/math], czyli tyle ile jest różnych reszt z dzielenia przez liczbę [math]\displaystyle{ n }[/math], to zbiór tych reszt jest identyczny ze zbiorem reszt z dzielenia przez [math]\displaystyle{ n }[/math], czyli ze zbiorem [math]\displaystyle{ S = \{ 0, 1, 2, \ldots, n - 1 \} }[/math].


Twierdzenie C56
Niech [math]\displaystyle{ d \in \mathbb{Z}_+ }[/math] i niech będzie dany ciąg arytmetyczny liczb pierwszych o długości [math]\displaystyle{ n }[/math]

[math]\displaystyle{ p_k = p_0 + k d \qquad }[/math] dla [math]\displaystyle{ \; k = 0, 1, \ldots, n - 1 }[/math]

Z żądania, aby dany ciąg arytmetyczny był ciągiem arytmetycznym liczb pierwszych, wynika, że muszą być spełnione następujące warunki

  • [math]\displaystyle{ p_0 \nmid d }[/math]
  • [math]\displaystyle{ n \leqslant p_0 }[/math]
  • [math]\displaystyle{ P(n - 1) |d }[/math]
  • jeżeli liczba pierwsza [math]\displaystyle{ q }[/math] nie dzieli [math]\displaystyle{ d }[/math], to [math]\displaystyle{ n \leqslant q }[/math]

gdzie [math]\displaystyle{ P(t) }[/math] jest iloczynem wszystkich liczb pierwszych nie większych od [math]\displaystyle{ t }[/math].

Dowód

Punkt 1.
Gdyby [math]\displaystyle{ p_0 |d }[/math], to dla [math]\displaystyle{ k \geqslant 1 }[/math] mielibyśmy [math]\displaystyle{ p_k = p_0 \left( 1 + k \cdot \frac{d}{p_0} \right) }[/math] i wszystkie te liczby byłyby złożone.

Punkt 2.
Ponieważ [math]\displaystyle{ p_0 }[/math] dzieli [math]\displaystyle{ p_0 + p_0 d }[/math], więc musi być [math]\displaystyle{ n - 1 \lt p_0 }[/math], czyli [math]\displaystyle{ n \leqslant p_0 }[/math].

Punkt 3.
Niech [math]\displaystyle{ q }[/math] będzie liczbą pierwszą mniejszą od [math]\displaystyle{ n }[/math], a liczby [math]\displaystyle{ r_k }[/math] będą resztami uzyskanymi z dzielenia liczb [math]\displaystyle{ p_k = p_0 + k d }[/math] przez [math]\displaystyle{ q }[/math], dla [math]\displaystyle{ k = 0, 1, \ldots, q - 1 }[/math]. Ponieważ z założenia liczby [math]\displaystyle{ p_0, \ldots, p_{n - 1} }[/math] są liczbami pierwszymi większymi od [math]\displaystyle{ q }[/math] (zauważmy, że [math]\displaystyle{ p_0 \geqslant n }[/math]), to żadna z reszt [math]\displaystyle{ r_k }[/math] nie może być równa zeru. Czyli mamy [math]\displaystyle{ q }[/math] reszt mogących przyjmować jedynie [math]\displaystyle{ q - 1 }[/math] różnych wartości. Zatem istnieją różne liczby [math]\displaystyle{ i, j }[/math], takie że [math]\displaystyle{ 0 \leqslant i \lt j \leqslant q - 1 }[/math], dla których [math]\displaystyle{ r_i = r_j }[/math]. Wynika stąd, że różnica liczb

[math]\displaystyle{ p_j - p_i = (p_0 + j d) - (p_0 + i d) = d (j - i) }[/math]

musi być podzielna przez [math]\displaystyle{ q }[/math]. Ponieważ [math]\displaystyle{ q \nmid (j - i) }[/math], bo [math]\displaystyle{ 1 \leqslant j - i \leqslant q - 1 \lt q }[/math], zatem z lematu Euklidesa [math]\displaystyle{ q|d }[/math].

Z uwagi na fakt, że jest tak dla każdej liczby pierwszej [math]\displaystyle{ q \lt n }[/math], liczba [math]\displaystyle{ d }[/math] musi być podzielna przez

[math]\displaystyle{ P(n - 1) = \prod_{q \lt n} q }[/math]

Punkt 4.
Ponieważ [math]\displaystyle{ P(n - 1)|d }[/math], to wszystkie liczby pierwsze mniejsze od [math]\displaystyle{ n }[/math] muszą być dzielnikami [math]\displaystyle{ d }[/math]. Wynika stąd, że jeśli liczba pierwsza [math]\displaystyle{ q }[/math] nie dzieli [math]\displaystyle{ d }[/math], to musi być [math]\displaystyle{ q \geqslant n }[/math]. Co należało pokazać.


Uwaga C57
Czasami, zamiast pisać „ciąg arytmetyczny liczb pierwszych”, będziemy posługiwali się skrótem PAP od angielskiej nazwy „prime arithmetic progression”. Konsekwentnie zapis PAP-[math]\displaystyle{ n }[/math] będzie oznaczał ciąg arytmetyczny liczb pierwszych o długości [math]\displaystyle{ n }[/math], a zapis PAP[math]\displaystyle{ (n, d, q) }[/math] ciąg arytmetyczny liczb pierwszych o długości [math]\displaystyle{ n }[/math], pierwszym wyrazie [math]\displaystyle{ q }[/math] i różnicy [math]\displaystyle{ d }[/math].


Uwaga C58
Jakkolwiek sądzimy, że istnieje nieskończenie wiele ciągów arytmetycznych liczb pierwszych rozpoczynających się od dowolnej liczby pierwszej [math]\displaystyle{ q }[/math] i o dowolnej długości [math]\displaystyle{ 3 \leqslant n \leqslant q }[/math], to obecnie jest to tylko nieudowodnione przypuszczenie.

Dlatego nawet dla najmniejszej liczby pierwszej [math]\displaystyle{ q }[/math] takiej, że [math]\displaystyle{ q \nmid d }[/math] nierówność [math]\displaystyle{ n \leqslant q }[/math], pokazana w twierdzeniu C56, pozostaje nadal tylko oszacowaniem. W szczególności nie możemy z góry przyjmować, że dla liczby [math]\displaystyle{ n = q }[/math] znajdziemy taką liczbę [math]\displaystyle{ d }[/math] będącą wielokrotnością liczby [math]\displaystyle{ P(q - 1) }[/math] i niepodzielną przez [math]\displaystyle{ q }[/math], że będzie istniał PAP[math]\displaystyle{ (q, d, q) }[/math].


Przykład C59
Rozważmy dwie różnice [math]\displaystyle{ d_1 = 6 = 2 \cdot 3 }[/math] oraz [math]\displaystyle{ d_2 = 42 = 2 \cdot 3 \cdot 7 }[/math]. Zauważmy, że liczba pierwsza [math]\displaystyle{ 5 }[/math] nie dzieli ani [math]\displaystyle{ d_1 }[/math], ani [math]\displaystyle{ d_2 }[/math]. Co więcej, liczba pierwsza [math]\displaystyle{ 5 }[/math] jest najmniejszą liczbą pierwszą, która nie dzieli rozpatrywanych różnic, zatem nierówność [math]\displaystyle{ n \leqslant 5 }[/math] zapewnia najmocniejsze oszacowanie długości ciągu [math]\displaystyle{ n }[/math]. Łatwo sprawdzamy w zamieszczonych tabelach, że dla [math]\displaystyle{ d = 6 }[/math] oraz dla [math]\displaystyle{ d = 42 }[/math] są ciągi o długości [math]\displaystyle{ 3, 4, 5 }[/math], ale nie ma ciągów o długości [math]\displaystyle{ 6, 7, \ldots }[/math]

W szczególności z twierdzenia C56 wynika, że szukając ciągów arytmetycznych liczb pierwszych o określonej długości [math]\displaystyle{ n }[/math], należy szukać ich tylko dla różnic [math]\displaystyle{ d }[/math] będących wielokrotnością liczby [math]\displaystyle{ P(n - 1) }[/math].


Zadanie C60
Wiemy, że liczby pierwsze [math]\displaystyle{ p \gt 3 }[/math] można przedstawić w jednej z postaci [math]\displaystyle{ 6 k - 1 }[/math] lub [math]\displaystyle{ 6 k + 1 }[/math]. Pokazać, że jeżeli [math]\displaystyle{ p_0 = 3 }[/math], to dwa następne wyrazu rosnącego ciągu arytmetycznego liczb pierwszych są różnych postaci.

Rozwiązanie

Ponieważ [math]\displaystyle{ p_0 = 3 }[/math], a rozpatrywany PAP jest rosnący, to kolejne wyrazy ciągu są większe od liczby [math]\displaystyle{ 3 }[/math] i mogą być przedstawione w jednej z postaci [math]\displaystyle{ 6 k - 1 }[/math] lub [math]\displaystyle{ 6 k + 1 }[/math]. Z twierdzenia C56 wiemy, że musi być [math]\displaystyle{ n \leqslant p_0 = 3 }[/math], czyli długość rozpatrywanego ciągu arytmetycznego liczb pierwszych wynosi dokładnie [math]\displaystyle{ 3 }[/math] i istnieją tylko dwa następne wyrazy.

Rozważmy ciąg arytmetyczny liczb pierwszych składający się z trzech wyrazów [math]\displaystyle{ p, q, r }[/math] takich, że [math]\displaystyle{ p = 3 }[/math]. Mamy

[math]\displaystyle{ r = q + d = q + (q - p) = 2 q - p }[/math]

Zatem

[math]\displaystyle{ r + q = 3 q - 3 }[/math]

Widzimy, że prawa strona powyższej równości jest podzielna przez [math]\displaystyle{ 3 }[/math]. Zatem liczby po lewej stronie wypisanych wyżej równości muszą być różnych postaci, bo tylko w takim przypadku lewa strona równości będzie również podzielna przez [math]\displaystyle{ 3 }[/math].


Zadanie C61
Wiemy, że liczby pierwsze [math]\displaystyle{ p \gt 3 }[/math] można przedstawić w jednej z postaci [math]\displaystyle{ 6 k - 1 }[/math] lub [math]\displaystyle{ 6 k + 1 }[/math]. Pokazać, że wszystkie wyrazy rosnącego ciągu arytmetycznego liczb pierwszych [math]\displaystyle{ p_0, p_1, \ldots, p_{n - 1} }[/math], gdzie [math]\displaystyle{ p_0 \geqslant 5 }[/math] i [math]\displaystyle{ n \geqslant 3 }[/math] muszą być jednakowej postaci.

Rozwiązanie

Niech liczby [math]\displaystyle{ p, q, r }[/math] będą trzema kolejnymi (dowolnie wybranymi) wyrazami rozpatrywanego ciągu. Łatwo zauważmy, że

[math]\displaystyle{ r = q + d = q + (q - p) = 2 q - p }[/math]

Zatem

[math]\displaystyle{ p + q = 3 q - r }[/math]
[math]\displaystyle{ q + r = 3 q - p }[/math]
[math]\displaystyle{ p + r = 2 q }[/math]

Zauważmy, że prawa strona wypisanych wyżej równości nie jest podzielna przez [math]\displaystyle{ 3 }[/math], bo liczby [math]\displaystyle{ p, q, r }[/math] są liczbami pierwszymi większymi od liczby [math]\displaystyle{ 3 }[/math]. Zatem liczby po lewej stronie wypisanych wyżej równości muszą być tej samej postaci, bo gdyby było inaczej, to lewa strona tych równości byłaby podzielna przez [math]\displaystyle{ 3 }[/math], a prawa nie. Czyli każda para liczb z trójki [math]\displaystyle{ p, q, r }[/math] musi być tej samej postaci i wynika stąd, że wszystkie trzy liczby muszą być tej samej postaci. Ponieważ trzy kolejne wyrazy ciągu [math]\displaystyle{ p_0, p_1, \ldots, p_{n - 1} }[/math] były wybrane dowolnie, to wszystkie wyrazy tego ciągu muszą być tej samej postaci.


Zadanie C62
Niech [math]\displaystyle{ d \gt 0 }[/math] będzie różnicą ciągu arytmetycznego liczb pierwszych o długości [math]\displaystyle{ n }[/math]

[math]\displaystyle{ p_k = p_0 + k d \qquad }[/math] dla [math]\displaystyle{ \; k = 0, 1, \ldots, n - 1 }[/math]

Pokazać, nie korzystając z twierdzenia C56, że jeżeli liczba pierwsza [math]\displaystyle{ q }[/math] nie dzieli [math]\displaystyle{ d }[/math], to [math]\displaystyle{ n \leqslant q }[/math].

Rozwiązanie

Przypuśćmy, że [math]\displaystyle{ n \gt q }[/math] tak, że [math]\displaystyle{ q \lt n \leqslant p_0 }[/math], zatem

[math]\displaystyle{ q \lt p_k = p_0 + k d \qquad }[/math] dla [math]\displaystyle{ \; k = 0, 1, \ldots, n - 1 }[/math]

Ponieważ [math]\displaystyle{ q \nmid d }[/math], to na mocy twierdzenia C55 wśród [math]\displaystyle{ q }[/math] kolejnych wyrazów [math]\displaystyle{ p_0, p_1, \ldots, p_{q - 1} }[/math] (zauważmy, że [math]\displaystyle{ q - 1 \lt n - 1 }[/math]) jedna liczba pierwsza [math]\displaystyle{ p_k }[/math] musi być podzielna przez [math]\displaystyle{ q }[/math], zatem musi być równa [math]\displaystyle{ q }[/math]. Jednak jest to niemożliwe, bo [math]\displaystyle{ q \lt p_k }[/math] dla wszystkich [math]\displaystyle{ k = 0, 1, \ldots, n - 1 }[/math]. Zatem nie może być [math]\displaystyle{ n \gt q }[/math].


Twierdzenie C63
Niech [math]\displaystyle{ q }[/math] będzie liczbą pierwszą, a liczby pierwsze

[math]\displaystyle{ p_k = p_0 + k d \qquad }[/math] gdzie [math]\displaystyle{ \; k = 0, 1, \ldots, q - 1 }[/math]

tworzą ciąg arytmetyczny o długości [math]\displaystyle{ q }[/math] i różnicy [math]\displaystyle{ d \gt 0 }[/math].

Równość [math]\displaystyle{ p_0 = q }[/math] zachodzi wtedy i tylko wtedy, gdy [math]\displaystyle{ q \nmid d }[/math].

Dowód

[math]\displaystyle{ \Longrightarrow }[/math]
Jeżeli [math]\displaystyle{ p_0 = q }[/math], to [math]\displaystyle{ q }[/math]-wyrazowy ciąg arytmetyczny liczb pierwszych ma postać

[math]\displaystyle{ p_k = q + k d \qquad }[/math] dla [math]\displaystyle{ \; k = 0, 1, \ldots, q - 1 }[/math]

Gdyby [math]\displaystyle{ q|d }[/math], to mielibyśmy

[math]\displaystyle{ p_k = q \left( 1 + k \cdot \frac{d}{q} \right) }[/math]

i wszystkie liczby [math]\displaystyle{ p_k }[/math] dla [math]\displaystyle{ k \geqslant 1 }[/math] byłyby złożone, wbrew założeniu, że [math]\displaystyle{ p_k }[/math] tworzą [math]\displaystyle{ q }[/math]-wyrazowy ciąg arytmetyczny liczb pierwszych.

[math]\displaystyle{ \Longleftarrow }[/math]
Ponieważ [math]\displaystyle{ q }[/math] jest długością rozpatrywanego ciągu arytmetycznego liczb pierwszych, to z twierdzenia C56 wynika, że musi być [math]\displaystyle{ q \leqslant p_0 }[/math].

Z założenia liczba pierwsza [math]\displaystyle{ q }[/math] nie dzieli [math]\displaystyle{ d }[/math], zatem z twierdzenia C55 wiemy, że [math]\displaystyle{ q }[/math] musi dzielić jedną z liczb [math]\displaystyle{ p_0, p_1, \ldots, p_{q - 1} }[/math].

Jeżeli [math]\displaystyle{ q|p_k }[/math], to [math]\displaystyle{ p_k = q }[/math]. Ponieważ [math]\displaystyle{ q \leqslant p_0 }[/math], to możliwe jest jedynie [math]\displaystyle{ q|p_0 }[/math] i musi być [math]\displaystyle{ p_0 = q }[/math].


Uwaga C64
Niech ciąg arytmetyczny liczb pierwszych o długości [math]\displaystyle{ n }[/math] ma postać

[math]\displaystyle{ p_k = p_0 + k d \qquad }[/math] dla [math]\displaystyle{ \; k = 0, 1, \ldots, n - 1 }[/math]

Z udowodnionych wyżej twierdzeń C56 i C63 wynika, że ciągi arytmetyczne liczb pierwszych o długości [math]\displaystyle{ n }[/math] można podzielić na dwie grupy

  • jeżeli [math]\displaystyle{ n }[/math] jest liczbą pierwszą i [math]\displaystyle{ n \nmid d }[/math], to [math]\displaystyle{ P(n - 1) |d }[/math] oraz [math]\displaystyle{ p_0 = n }[/math] (dla ustalonego [math]\displaystyle{ d }[/math] może istnieć tylko jeden ciąg)
  • jeżeli [math]\displaystyle{ n }[/math] jest liczbą złożoną lub [math]\displaystyle{ n|d }[/math], to [math]\displaystyle{ P(n) |d }[/math] oraz [math]\displaystyle{ p_0 \gt n }[/math]

Funkcja [math]\displaystyle{ P(t) }[/math] jest iloczynem wszystkich liczb pierwszych nie większych od [math]\displaystyle{ t }[/math].


Przykład C65
Niech różnica ciągu arytmetycznego liczb pierwszych wynosi [math]\displaystyle{ d = 10^t }[/math], gdzie [math]\displaystyle{ t \geqslant 1 }[/math]. Zauważmy, że dla dowolnego [math]\displaystyle{ t }[/math] liczba [math]\displaystyle{ 3 }[/math] jest najmniejszą liczbą pierwszą, która nie dzieli [math]\displaystyle{ d }[/math]. Z oszacowania [math]\displaystyle{ n \leqslant 3 }[/math] wynika, że musi być [math]\displaystyle{ n = 3 }[/math].

Jeżeli długość ciągu [math]\displaystyle{ n = 3 }[/math] i [math]\displaystyle{ n \nmid d }[/math], to musi być [math]\displaystyle{ p_0 = n = 3 }[/math] i może istnieć tylko jeden PAP dla każdego [math]\displaystyle{ d }[/math]. W przypadku [math]\displaystyle{ t \leqslant 10000 }[/math] jedynie dla [math]\displaystyle{ t = 1, 5, 6, 17 }[/math] wszystkie liczby ciągu arytmetycznego [math]\displaystyle{ (3, 3 + 10^t, 3 + 2 \cdot 10^t) }[/math] są pierwsze.


Zadanie C66
Znaleźć wszystkie PAP[math]\displaystyle{ (n, d, p) }[/math] dla [math]\displaystyle{ d = 2, 4, 8, 10, 14, 16 }[/math].

Rozwiązanie

Zauważmy, że dla każdej z podanych różnic [math]\displaystyle{ d }[/math], liczba [math]\displaystyle{ 3 }[/math] jest najmniejszą liczbą pierwszą, która nie dzieli [math]\displaystyle{ d }[/math]. Z oszacowania [math]\displaystyle{ n \leqslant 3 }[/math] wynika, że musi być [math]\displaystyle{ n = 3 }[/math].

Ponieważ [math]\displaystyle{ n = 3 }[/math] jest liczbą pierwszą i dla wypisanych [math]\displaystyle{ d }[/math] liczba [math]\displaystyle{ n \nmid d }[/math], to w każdym przypadku może istnieć tylko jeden ciąg, którego pierwszym wyrazem jest liczba pierwsza [math]\displaystyle{ p_0 = n = 3 }[/math]. Dla [math]\displaystyle{ d = 2, 4, 8, 10, 14 }[/math] łatwo znajdujemy odpowiednie ciągi

[math]\displaystyle{ (3, 5, 7) }[/math], [math]\displaystyle{ \qquad (3, 7, 11) }[/math], [math]\displaystyle{ \qquad (3, 11, 19) }[/math], [math]\displaystyle{ \qquad (3, 13, 23) }[/math], [math]\displaystyle{ \qquad (3, 17, 31) }[/math]

Dla [math]\displaystyle{ d = 16 }[/math] szukany ciąg nie istnieje, bo [math]\displaystyle{ 35 = 5 \cdot 7 }[/math].


Zadanie C67
Znaleźć wszystkie PAP[math]\displaystyle{ (n, d, p) }[/math] dla [math]\displaystyle{ n = 3, 5, 7, 11 }[/math] i [math]\displaystyle{ d = P (n - 1) }[/math].

Rozwiązanie

Z założenia PAP ma długość [math]\displaystyle{ n }[/math], liczba [math]\displaystyle{ n }[/math] jest liczbą pierwszą i [math]\displaystyle{ n \nmid d }[/math]. Zatem może istnieć tylko jeden PAP taki, że [math]\displaystyle{ p_0 = n }[/math]. Dla [math]\displaystyle{ n = 3, 5 }[/math] i odpowiednio [math]\displaystyle{ d = 2, 6 }[/math] otrzymujemy ciągi arytmetyczne liczb pierwszych

[math]\displaystyle{ (3, 5, 7) }[/math], [math]\displaystyle{ \qquad (5, 11, 17, 23, 29) }[/math]

Ale dla [math]\displaystyle{ n = 7, 11 }[/math] i odpowiednio [math]\displaystyle{ d = 30, 210 }[/math] szukane ciągi nie istnieją, bo

[math]\displaystyle{ (7, 37, 67, 97, 127, 157, {\color{Red} 187 = 11 \cdot 17}) }[/math]
[math]\displaystyle{ (11, {\color{Red} 221 = 13 \cdot 17}, 431, 641, {\color{Red} 851 = 23 \cdot 37}, 1061, {\color{Red} 1271 = 31 \cdot 41}, 1481, {\color{Red} 1691 = 19 \cdot 89}, 1901, 2111) }[/math]


Przykład C68
Przedstawiamy przykładowe ciągi arytmetyczne liczb pierwszych, takie że [math]\displaystyle{ n = p_0 }[/math] dla [math]\displaystyle{ n = 3, 5, 7, 11, 13 }[/math]. Zauważmy, że wypisane w tabeli wartości [math]\displaystyle{ d }[/math] są wielokrotnościami liczby [math]\displaystyle{ P(n - 1) }[/math].

Pokaż tabelę


Przykłady takich ciągów dla jeszcze większych liczb pierwszych Czytelnik znajdzie na stronie A088430.


Przykład C69
Liczby [math]\displaystyle{ 3, 5, 7 }[/math] są najprostszym przykładem ciągu arytmetycznego kolejnych liczb pierwszych. Zauważmy, że tylko w przypadku [math]\displaystyle{ n = 3 }[/math] możliwa jest sytuacja, że [math]\displaystyle{ n = p_0 = 3 }[/math]. Istotnie, łatwo stwierdzamy, że

  • ponieważ [math]\displaystyle{ p_0 }[/math] i [math]\displaystyle{ p_1 }[/math]kolejnymi liczbami pierwszymi, to [math]\displaystyle{ p_1 - p_0 \lt p_0 }[/math] (zobacz zadanie B22)
  • dla dowolnej liczby pierwszej [math]\displaystyle{ q \geqslant 5 }[/math] jest [math]\displaystyle{ q \lt P (q - 1) }[/math] (zobacz zadanie B26)

Przypuśćmy teraz, że istnieje ciąg arytmetyczny kolejnych liczb pierwszych, taki że [math]\displaystyle{ n = p_0 \geqslant 5 }[/math]. Mamy

[math]\displaystyle{ d = p_1 - p_0 \lt p_0 \lt P (p_0 - 1) = P (n - 1) }[/math]

Zatem [math]\displaystyle{ P(n - 1) \nmid d }[/math], co jest niemożliwe.

Wynika stąd, że poza przypadkiem [math]\displaystyle{ n = p_0 = 3 }[/math] ciąg arytmetyczny kolejnych liczb pierwszych musi spełniać warunek [math]\displaystyle{ P(n)|d }[/math], czyli [math]\displaystyle{ P(n)|(p_1 - p_0) }[/math].

Poniższe tabele przedstawiają przykładowe ciągi arytmetyczne kolejnych liczb pierwszych o długościach [math]\displaystyle{ n = 3, 4, 5, 6 }[/math] dla rosnących wartości [math]\displaystyle{ p_0 }[/math]. Nie istnieje ciąg arytmetyczny kolejnych liczb pierwszych o długości [math]\displaystyle{ n = 7 }[/math] dla [math]\displaystyle{ p_0 \lt 10^{13} }[/math]. Prawdopodobnie CPAP-7 pojawią się dopiero dla [math]\displaystyle{ p_0 \sim 10^{20} }[/math].

Znane są ciągi arytmetyczne kolejnych liczb pierwszych o długościach [math]\displaystyle{ n \leqslant 10 }[/math][13].

Pokaż tabele



Zadanie C70
Uzasadnij przypuszczenie, że ciągów arytmetycznych kolejnych liczb pierwszych o długości [math]\displaystyle{ n = 7 }[/math] możemy oczekiwać dopiero dla [math]\displaystyle{ p_0 \sim 10^{20} }[/math].

Rozwiązanie

Zauważmy, że ilość liczb pierwszych nie większych od [math]\displaystyle{ x }[/math] w dobrym przybliżeniu jest określona funkcją [math]\displaystyle{ \frac{x}{\log x} }[/math]. Ponieważ funkcja [math]\displaystyle{ \log x }[/math] zmienia się bardzo wolno, to odcinki liczb naturalnych o tej samej długości położone w niewielkiej odległości od siebie będą zawierały podobne ilości liczb pierwszych. Przykładowo, dla dużych wartości [math]\displaystyle{ x }[/math], ilość liczb pierwszych w przedziale [math]\displaystyle{ (x, 2 x) }[/math] jest tego samego rzędu, co ilość liczb pierwszych w przedziale [math]\displaystyle{ (1, x) }[/math][14].


Zatem liczbę [math]\displaystyle{ \frac{1}{\log x} }[/math] możemy traktować jako prawdopodobieństwo trafienia na liczbę pierwszą wśród liczb znajdujących się w pobliżu liczby [math]\displaystyle{ x }[/math]. Zakładając, że liczby pierwsze są rozłożone przypadkowo, możemy wyliczyć prawdopodobieństwo tego, że [math]\displaystyle{ n }[/math] kolejnych liczb pierwszych, położonych w pobliżu liczby [math]\displaystyle{ x }[/math], utworzy ciąg arytmetyczny

[math]\displaystyle{ \text{prob}_{\text{cpap}} (n, x) = \left( \frac{1}{\log x} \right)^n \left( 1 - \frac{1}{\log x} \right)^{(n - 1) (d - 1)} }[/math]

gdzie [math]\displaystyle{ d = P (n) }[/math]. Jest tak, ponieważ w ciągu kolejnych liczb całkowitych musimy trafić na liczbę pierwszą, następnie na [math]\displaystyle{ d - 1 }[/math] liczb złożonych, taka sytuacja musi się powtórzyć dokładnie [math]\displaystyle{ n - 1 }[/math] razy, a na koniec znowu musimy trafić na liczbę pierwszą. Czyli potrzebujemy [math]\displaystyle{ n }[/math] liczb pierwszych, na które trafiamy z prawdopodobieństwem [math]\displaystyle{ \frac{1}{\log x} }[/math] oraz [math]\displaystyle{ (n - 1) (d - 1) }[/math] liczb złożonych, na które trafiamy z prawdopodobieństwem [math]\displaystyle{ 1 - \frac{1}{\log x} }[/math], a liczby te muszą pojawiać się w ściśle określonej kolejności.


Ilość ciągów arytmetycznych utworzonych przez [math]\displaystyle{ n }[/math] kolejnych liczb pierwszych należących do przedziału [math]\displaystyle{ (x, 2 x) }[/math] możemy zatem oszacować na równą około

[math]\displaystyle{ Q_{\text{cpap}}(n, x) = x \cdot \left( \frac{1}{\log x} \right)^n \left( 1 - \frac{1}{\log x} \right)^{(n - 1) (d - 1)} }[/math]


Porównując powyższe oszacowanie z rzeczywistą ilością [math]\displaystyle{ \# \text{CPAP}(n, x) }[/math] ciągów arytmetycznych kolejnych liczb pierwszych w przedziale [math]\displaystyle{ (x, 2x) }[/math] dostajemy

[math]\displaystyle{ \frac{\# \text{CPAP}(n, x)}{Q_{\text{cpap}} (n, x)} = f (n, x) }[/math]

gdzie w możliwym do zbadania zakresie, czyli dla [math]\displaystyle{ x \lt 2^{42} \approx 4.4 \cdot 10^{12} }[/math] mamy

[math]\displaystyle{ f(n, x) \approx a_n \cdot \log x + b_n }[/math]

Stałe [math]\displaystyle{ a_n }[/math] i [math]\displaystyle{ b_n }[/math] wyznaczamy metodą regresji liniowej. Musimy pamiętać, że uzyskanych w ten sposób wyników nie możemy ekstrapolować dla dowolnie dużych [math]\displaystyle{ x }[/math].

W przypadku [math]\displaystyle{ n = 5 }[/math] oraz [math]\displaystyle{ n = 6 }[/math] dysponowaliśmy zbyt małą liczbą danych, aby wyznaczyć stałe [math]\displaystyle{ a_n }[/math] i [math]\displaystyle{ b_n }[/math] z wystarczającą dokładnością. Dlatego w tych przypadkach ograniczyliśmy się do podania oszacowania funkcji [math]\displaystyle{ f(n, x) }[/math].

Uzyskany wyżej rezultaty są istotne, bo z wyliczonych postaci funkcji [math]\displaystyle{ f(n, x) }[/math] wynika, że są to funkcje bardzo wolno zmienne, a ich ekstrapolacja jest w pełni uprawniona.


W zamieszczonej niżej tabeli mamy kolejno

  • [math]\displaystyle{ n }[/math], czyli długość CPAP
  • wartość iloczynu [math]\displaystyle{ n \cdot P (n) }[/math]
  • znalezioną postać funkcji [math]\displaystyle{ f(n, x) }[/math] lub oszacowanie wartości tej funkcji [math]\displaystyle{ C_n }[/math] na podstawie uzyskanych danych; w przypadku [math]\displaystyle{ n = 7 }[/math] jest to oszacowanie wynikające z obserwacji, że wartości funkcji [math]\displaystyle{ f(n, x) }[/math] są rzędu [math]\displaystyle{ n \cdot P (n) }[/math]
  • wyliczoną wartość [math]\displaystyle{ \frac{\# \text{CPAP}(n, 2^{40})}{Q_{\text{cpap}}(n, 2^{40})} }[/math], czyli [math]\displaystyle{ f(n, 2^{40}) }[/math]
  • wartość funkcji [math]\displaystyle{ f(n, 2^{70}) }[/math] wynikające z ekstrapolacji wzoru [math]\displaystyle{ f(n, x) = a_n \cdot \log x + b_n \qquad }[/math] (dla [math]\displaystyle{ n = 3, 4 }[/math])
  • wartość [math]\displaystyle{ x }[/math] wynikającą z rozwiązania równania
[math]\displaystyle{ \qquad (a_n \cdot \log x + b_n) \cdot Q_{\text{cpap}} (n, x) = 1 \qquad }[/math] (dla [math]\displaystyle{ n = 3, 4 }[/math])
[math]\displaystyle{ \qquad C_n \cdot Q_{\text{cpap}} (n, x) = 1 \qquad }[/math] (dla [math]\displaystyle{ n = 5, 6, 7 }[/math])
  • dla porównania w kolejnych kolumnach zostały podane dwie najmniejsze wartości [math]\displaystyle{ p_0 }[/math] dla CPAP-n

Zauważając, że funkcje [math]\displaystyle{ f(n, x) }[/math] są rzędu [math]\displaystyle{ n \cdot P (n) }[/math] i przyjmując, że podobnie będzie dla [math]\displaystyle{ f(7, x) }[/math], możemy wyliczyć wartość [math]\displaystyle{ x }[/math], dla której może pojawić się pierwszy CPAP-7. Wartość ta jest równa w przybliżeniu [math]\displaystyle{ 2 \cdot 10^{20} }[/math] i wynika z rozwiązania równania

[math]\displaystyle{ f(7, x) \cdot Q_{\text{cpap}}(7, x) = 1 }[/math]

Możemy ją łatwo wyliczyć w PARI/GP. Oczywiście funkcję [math]\displaystyle{ f(7, x) }[/math] zastąpiliśmy jej oszacowaniem [math]\displaystyle{ C_7 = 2500 }[/math]

P(n) = prod(k=2, n, if( isprime(k), k, 1 ))
Q(x) = 2500 * x * ( 1/log(x) )^7 * ( 1 - 1/log(x) )^( (7-1)*(P(7)-1) )
solve(x=10^10, 10^23, Q(x) - 1 )




Uzupełnienie

Twierdzenie C71 (lemat Bézouta)
Jeżeli liczby całkowite [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] nie są jednocześnie równe zeru, a największy wspólny dzielnik tych liczb jest równy [math]\displaystyle{ D }[/math], to istnieją takie liczby całkowite [math]\displaystyle{ x, y }[/math], że

[math]\displaystyle{ a x + b y = D }[/math]
Dowód

Niech [math]\displaystyle{ S }[/math] będzie zbiorem wszystkich liczb całkowitych dodatnich postaci [math]\displaystyle{ a n + b m }[/math], gdzie [math]\displaystyle{ n, m }[/math] są dowolnymi liczbami całkowitymi. Zbiór [math]\displaystyle{ S }[/math] nie jest zbiorem pustym, bo przykładowo liczba [math]\displaystyle{ a^2 + b^2 \in S }[/math]. Z zasady dobrego uporządkowania liczb naturalnych wynika, że zbiór [math]\displaystyle{ S }[/math] ma element najmniejszy, oznaczmy go literą [math]\displaystyle{ d }[/math].

Pokażemy, że [math]\displaystyle{ d \mid a }[/math] i [math]\displaystyle{ d \mid b }[/math]. Z twierdzenia o dzieleniu z resztą możemy napisać [math]\displaystyle{ a = k d + r }[/math], gdzie [math]\displaystyle{ 0 \leqslant r \lt d }[/math].

Przypuśćmy, że [math]\displaystyle{ d \nmid a }[/math], czyli że [math]\displaystyle{ r \gt 0 }[/math]. Ponieważ [math]\displaystyle{ d \in S }[/math], to mamy [math]\displaystyle{ d = a u + b v }[/math] dla pewnych liczb całkowitych [math]\displaystyle{ u }[/math] i [math]\displaystyle{ v }[/math]. Zatem

[math]\displaystyle{ r = a - k d = }[/math]
[math]\displaystyle{ \;\;\, = a - k (a u + b v) = }[/math]
[math]\displaystyle{ \;\;\, = a \cdot (1 - k u) + b \cdot (- k v) }[/math]

Wynika stąd, że dodatnia liczba [math]\displaystyle{ r }[/math] należy do zbioru [math]\displaystyle{ S }[/math] oraz [math]\displaystyle{ r \lt d }[/math], wbrew określeniu liczby [math]\displaystyle{ d }[/math], czyli musi być [math]\displaystyle{ r = 0 }[/math] i [math]\displaystyle{ d \mid a }[/math]. Podobnie pokazujemy, że [math]\displaystyle{ d \mid b }[/math].

Jeżeli [math]\displaystyle{ d' }[/math] jest innym dzielnikiem liczb [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math], to [math]\displaystyle{ d' \mid d }[/math], bo [math]\displaystyle{ d' \mid (a u + b v) }[/math]. Zatem [math]\displaystyle{ d' \leqslant d }[/math], skąd wynika natychmiast, że liczba [math]\displaystyle{ d }[/math] jest największym z dzielników, które jednocześnie dzielą liczby [math]\displaystyle{ a }[/math] oraz [math]\displaystyle{ b }[/math]. Czyli [math]\displaystyle{ d = D }[/math].


Twierdzenie C72 (lemat Euklidesa)
Niech [math]\displaystyle{ p }[/math] będzie liczbą pierwszą oraz [math]\displaystyle{ a, b, d \in \mathbb{Z} }[/math].

  • jeżeli [math]\displaystyle{ d \mid a b }[/math] i liczba [math]\displaystyle{ d }[/math] jest względnie pierwsza z [math]\displaystyle{ a }[/math], to [math]\displaystyle{ d \mid b }[/math]
  • jeżeli [math]\displaystyle{ p \mid a b }[/math], to [math]\displaystyle{ p \mid a }[/math] lub [math]\displaystyle{ p \mid b }[/math]
Dowód

Punkt 1.

Z założenia liczby [math]\displaystyle{ d }[/math] i [math]\displaystyle{ a }[/math] są względnie pierwsze, zatem na mocy lematu Bézouta (twierdzenie C71) istnieją takie liczby całkowite [math]\displaystyle{ x }[/math] i [math]\displaystyle{ y }[/math], że

[math]\displaystyle{ d x + a y = 1 }[/math]

Mnożąc obie strony równania przez [math]\displaystyle{ b }[/math], dostajemy

[math]\displaystyle{ d b x + a b y = b }[/math]

Obydwa wyrazy po prawej stronie są podzielne przez [math]\displaystyle{ d }[/math], bo z założenia [math]\displaystyle{ d \mid a b }[/math]. Zatem prawa strona również jest podzielna przez [math]\displaystyle{ d }[/math], czyli [math]\displaystyle{ d \mid b }[/math]. Co kończy dowód punktu pierwszego.

Punkt 2.

Jeżeli [math]\displaystyle{ p \nmid a }[/math], to [math]\displaystyle{ \gcd (p, a) = 1 }[/math], zatem z punktu pierwszego wynika, że [math]\displaystyle{ p \mid b }[/math].

Jeżeli [math]\displaystyle{ p \nmid b }[/math], to [math]\displaystyle{ \gcd (p, b) = 1 }[/math], zatem z punktu pierwszego wynika, że [math]\displaystyle{ p \mid a }[/math].

Czyli [math]\displaystyle{ p }[/math] musi dzielić przynajmniej jedną z liczb [math]\displaystyle{ a, b }[/math]. Co należało pokazać.


Twierdzenie C73
Niech [math]\displaystyle{ a, b, m \in \mathbb{Z} }[/math]. Jeżeli [math]\displaystyle{ a \mid m }[/math] i [math]\displaystyle{ b \mid m }[/math] oraz [math]\displaystyle{ \gcd (a, b) = 1 }[/math], to [math]\displaystyle{ a b \mid m }[/math].

Dowód

Z założenia istnieją takie liczby [math]\displaystyle{ r, s, x, y \in \mathbb{Z} }[/math], że [math]\displaystyle{ m = a r }[/math] i [math]\displaystyle{ m = b s }[/math] oraz

[math]\displaystyle{ a x + b y = 1 }[/math]

(zobacz C71). Zatem

[math]\displaystyle{ m = m (a x + b y) }[/math]
[math]\displaystyle{ \quad \, = m a x + m b y }[/math]
[math]\displaystyle{ \quad \, = b s a x + a r b y }[/math]
[math]\displaystyle{ \quad \, = a b (s x + r y) }[/math]

Czyli [math]\displaystyle{ a b \mid m }[/math]. Co należało pokazać.


Twierdzenie C74
Niech [math]\displaystyle{ a, b, c \in \mathbb{Z} }[/math]. Równanie [math]\displaystyle{ a x + b y = c }[/math] ma rozwiązanie wtedy i tylko wtedy, gdy największy wspólny dzielnik liczb [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] jest dzielnikiem liczby [math]\displaystyle{ c }[/math].

Dowód

Niech [math]\displaystyle{ D }[/math] oznacza największy wspólny dzielnik liczb [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math].

[math]\displaystyle{ \Longrightarrow }[/math]

Jeżeli liczby całkowite [math]\displaystyle{ x_0 }[/math] i [math]\displaystyle{ y_0 }[/math] są rozwiązaniem rozpatrywanego równania, to

[math]\displaystyle{ a x_0 + b y_0 = c }[/math]

Ponieważ [math]\displaystyle{ D }[/math] dzieli lewą stronę równania, to musi również dzielić prawą, zatem musi być [math]\displaystyle{ D|c }[/math].

[math]\displaystyle{ \Longleftarrow }[/math]

Jeżeli [math]\displaystyle{ D|c }[/math], to możemy napisać [math]\displaystyle{ c = k D }[/math] i równanie przyjmuje postać

[math]\displaystyle{ a x + b y = k D }[/math]

Lemat Bézouta (twierdzenie C71) zapewnia istnienie liczb całkowitych [math]\displaystyle{ x_0 }[/math] i [math]\displaystyle{ y_0 }[/math] takich, że

[math]\displaystyle{ a x_0 + b y_0 = D }[/math]

Czyli z lematu Bézouta wynika, że równanie [math]\displaystyle{ a x + b y = D }[/math] ma rozwiązanie w liczbach całkowitych. Przekształcając, dostajemy

[math]\displaystyle{ a(k x_0) + b (k y_0) = k D }[/math]

Zatem liczby [math]\displaystyle{ k x_0 }[/math] i [math]\displaystyle{ k y_0 }[/math] są rozwiązaniem równania

[math]\displaystyle{ a x + b y = k D }[/math]

Co oznacza, że równianie [math]\displaystyle{ a x + b y = c }[/math] ma rozwiązanie.


Uwaga C75
Z twierdzenia C74 wynika, że szukając rozwiązań równania [math]\displaystyle{ A x + B y = C }[/math] w liczbach całkowitych, powinniśmy

  • obliczyć największy wspólny dzielnik [math]\displaystyle{ D }[/math] liczb [math]\displaystyle{ A }[/math] i [math]\displaystyle{ B }[/math]
  • jeżeli [math]\displaystyle{ D \gt 1 }[/math], należy sprawdzić, czy [math]\displaystyle{ D|C }[/math]
  • jeżeli [math]\displaystyle{ D \nmid C }[/math], to równanie [math]\displaystyle{ A x + B y = C }[/math] nie ma rozwiązań w liczbach całkowitych
  • jeżeli [math]\displaystyle{ D|C }[/math], należy podzielić obie strony równania [math]\displaystyle{ A x + B y = C }[/math] przez [math]\displaystyle{ D }[/math] i przejść do rozwiązywania równania równoważnego [math]\displaystyle{ a x + b y = c }[/math], gdzie [math]\displaystyle{ a = \frac{A}{D} }[/math], [math]\displaystyle{ b = \frac{B}{D} }[/math], [math]\displaystyle{ c = \frac{C}{D} }[/math], zaś największy wspólny dzielnik liczb [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] jest równy [math]\displaystyle{ 1 }[/math].


Twierdzenie C76
Niech [math]\displaystyle{ a, b, c \in \mathbb{Z} }[/math]. Jeżeli liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] są względnie pierwsze, to równanie

[math]\displaystyle{ a x + b y = c }[/math]

ma nieskończenie wiele rozwiązań w liczbach całkowitych.

Jeżeli para liczb całkowitych [math]\displaystyle{ (x_0, y_0) }[/math] jest jednym z tych rozwiązań, to wszystkie pozostałe rozwiązania całkowite można otrzymać ze wzorów

[math]\displaystyle{ x = x_0 + b t }[/math]
[math]\displaystyle{ y = y_0 - a t }[/math]

gdzie [math]\displaystyle{ t }[/math] jest dowolną liczbą całkowitą.

Dowód

Z założenia liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] są względnie pierwsze, zatem największy wspólny dzielnik tych liczb jest równy [math]\displaystyle{ 1 }[/math] i dzieli liczbę [math]\displaystyle{ c }[/math]. Na mocy twierdzenia C74 równanie

[math]\displaystyle{ a x + b y = c }[/math]

ma rozwiązanie w liczbach całkowitych.

Zauważmy, że jeżeli para liczb całkowitych [math]\displaystyle{ (x_0, y_0) }[/math] jest rozwiązaniem równania [math]\displaystyle{ a x + b y = c }[/math], to para liczb [math]\displaystyle{ (x_0 + b t, y_0 - a t) }[/math] również jest rozwiązaniem. Istotnie

[math]\displaystyle{ a(x_0 + b t) + b (y_0 - a t) = a x_0 + a b t + b y_0 - b a t = }[/math]
[math]\displaystyle{ \, = a x_0 + b y_0 = }[/math]
[math]\displaystyle{ \, = c }[/math]

Pokażmy teraz, że nie istnieją inne rozwiązania niż określone wzorami

[math]\displaystyle{ x = x_0 + b t }[/math]
[math]\displaystyle{ y = y_0 - a t }[/math]

gdzie [math]\displaystyle{ t }[/math] jest dowolną liczbą całkowitą.

Przypuśćmy, że pary liczb całkowitych [math]\displaystyle{ (x, y) }[/math] oraz [math]\displaystyle{ (x_0, y_0) }[/math] są rozwiązaniami rozpatrywanego równania, zatem

[math]\displaystyle{ a x + b y = c = a x_0 + b y_0 }[/math]

Wynika stąd, że musi być spełniony warunek

[math]\displaystyle{ a(x - x_0) = b (y_0 - y) }[/math]

Ponieważ liczby [math]\displaystyle{ a }[/math] i [math]\displaystyle{ b }[/math] są względnie pierwsze, to na mocy lematu Euklidesa (twierdzenie C72) [math]\displaystyle{ b|(x - x_0) }[/math]. Skąd mamy

[math]\displaystyle{ x - x_0 = b t }[/math]

gdzie [math]\displaystyle{ t }[/math] jest dowolną liczbą całkowitą. Po podstawieniu dostajemy natychmiast

[math]\displaystyle{ y - y_0 = - a t }[/math]

Co kończy dowód.


Przykład C77
Rozwiązania równania

[math]\displaystyle{ a x + b y = c }[/math]

gdzie [math]\displaystyle{ \gcd (a, b) = 1 }[/math], które omówiliśmy w poprzednim twierdzeniu, najłatwiej znaleźć korzystając w PARI/GP z funkcji gcdext(a, b). Funkcja ta zwraca wektor liczb [x0, y0, d], gdzie [math]\displaystyle{ d = \gcd (a, b) }[/math], a liczby [math]\displaystyle{ x_0 }[/math] i [math]\displaystyle{ y_0 }[/math] są rozwiązaniami równania

[math]\displaystyle{ a x_0 + b y_0 = \gcd (a, b) }[/math]

Ponieważ założyliśmy, że [math]\displaystyle{ \gcd (a, b) = 1 }[/math], to łatwo zauważmy, że

[math]\displaystyle{ a(c x_0) + b (c y_0) = c }[/math]

Zatem para liczb całkowitych [math]\displaystyle{ (c x_0, c y_0) }[/math] jest jednym z rozwiązań równania

[math]\displaystyle{ a x + b y = c }[/math]

i wszystkie pozostałe rozwiązania uzyskujemy ze wzorów

[math]\displaystyle{ x = c x_0 + b t }[/math]
[math]\displaystyle{ y = c y_0 - a t }[/math]

Niech [math]\displaystyle{ a = 7 }[/math] i [math]\displaystyle{ b = 17 }[/math]. Funkcja gcdext(7,17) zwraca wektor [5, -2, 1], zatem rozwiązaniami równania [math]\displaystyle{ 7 x + 17 y = 1 }[/math] są liczby

[math]\displaystyle{ x = 5 + 17 t }[/math]
[math]\displaystyle{ y = - 2 - 7 t }[/math]

A rozwiązaniami równania [math]\displaystyle{ 7 x + 17 y = 10 }[/math] są liczby

[math]\displaystyle{ x = 50 + 17 t }[/math]
[math]\displaystyle{ y = - 20 - 7 t }[/math]








Przypisy

  1. Korzystamy w tym momencie z zasady dobrego uporządkowania zbioru liczb naturalnych, która stwierdza, że każdy niepusty podzbiór zbioru liczb naturalnych zawiera element najmniejszy. (Wiki-pl), (Wiki-en)
  2. Określenie, że „liczba [math]\displaystyle{ n }[/math] jest postaci [math]\displaystyle{ a k + b }[/math]”, jest jedynie bardziej czytelnym (obrazowym) zapisem stwierdzenia, że reszta z dzielenia liczby [math]\displaystyle{ n }[/math] przez [math]\displaystyle{ a }[/math] wynosi [math]\displaystyle{ b }[/math]. Zapis „liczba [math]\displaystyle{ n }[/math] jest postaci [math]\displaystyle{ a k - 1 }[/math]” oznacza, że reszta z dzielenia liczby [math]\displaystyle{ n }[/math] przez [math]\displaystyle{ a }[/math] wynosi [math]\displaystyle{ a - 1 }[/math].
  3. Wikipedia, Linnik's theorem, (Wiki-en)
  4. MathWorld, Linnik's Theorem. (MathWorld)
  5. Yuri Linnik, On the least prime in an arithmetic progression. I. The basic theorem, Mat. Sb. (N.S.) 15 (1944) 139–178.
  6. Yuri Linnik, On the least prime in an arithmetic progression. II. The Deuring-Heilbronn phenomenon, Mat. Sb. (N.S.) 15 (1944) 347–368.
  7. Triantafyllos Xylouris, Über die Nullstellen der Dirichletschen L-Funktionen und die kleinste Primzahl in einer arithmetischen Progression, Bonner Mathematische Schriften, vol. 404, Univ. Bonn, 2011, Diss.
  8. Wikipedia, Primes in arithmetic progression, (Wiki-en)
  9. MathWorld, Prime Arithmetic Progression, (LINK)
  10. J. G. van der Corput, Über Summen von Primzahlen und Primzahlquadraten, Mathematische Annalen, 116 (1939) 1-50, (LINK)
  11. Wikipedia, Largest known primes in AP, (Wiki-en)
  12. Ben Green and Terence Tao, The Primes Contain Arbitrarily Long Arithmetic Progressions., Ann. of Math. (2) 167 (2008), 481-547, (LINK1), Preprint. 8 Apr 2004, (LINK2)
  13. Wikipedia, Primes in arithmetic progression - Largest known consecutive primes in AP, (Wiki-en)
  14. Henryk Dąbrowski, Twierdzenie Czebyszewa o liczbie pierwszej między n i 2n - Uwagi do twierdzenia, (LINK)