Rozklad veľkých čísel

Factorization of Large Numbers

5. 8. 2021 Ing. Róbert Polák Matematika Mathematics

Úvod

Tento diel je venovaný rozkladom veľkých čísiel na súčin prvočísiel (prvočíselný rozklad). Každé číslo sa dá rozložiť na súčin prvočísiel. Tento program bol vytvorený v programovacom jazyku Python. Ide o konzolový program. Pre spustenie je potrebné si nainštalovať Python, alebo si program spustiť online cez prehliadač. Bližšie o inštalácii a spustení programu v Pythone nájdete v článku: Matematika v Pythone.

Tento program je potrebným, čiastkovým podkladom pre preverenie Riemannovej hypotézy (v nadväznosti na články Platnosť Riemannovej hypotézy, Riemannova hypotéza – platnosť (3. diel).). Program na rozklad čísla využíva algoritmus na hľadanie extrémnych prvočísel. Rozklady extrémne veľkých čísiel sú veľmi náročné na výpočtový výkon. Úplný rozklad (výpočtový čas) závisí hlavne od toho, či číslo obsahuje veľmi veľké prvočísla v rozklade. Neskôr bude tento kus kódu doplnený do výpočtu Gay - Robin indexu pre veľmi veľké čísla v nadväznosti na články o platnosti Riemannovej hypotézy.


Zdrojový kód programu

Screenshot - 5_ 8jpg
Obr.1 Ukážka kódu programu v Pythone

Verzia č.1:
download súboru v Pythone: number_decomposition.py
Pozrieť kód vo formáte ".txt": number_decomposition.txt
alebo stiahnuť kód z GitHub: odkaz

Popis: Algoritmus obsahuje rozklad čísla na prvočísla a následný výpis rozkladu.


Príklady extrémnych rozkladov

Screenshot - 5_ 8 002jpg
Obr.2 Príklad extrémneho rozkladu.

Príklad na obrázku trval ani nie sekundu. Toto číslo je jedno z tých najväčších, u ktorého vieme, že Gay-Robin index dosiahol hodnotu 1.757 (bližšie o tom pojednáva článok Platnosť Riemannovej hypotézy).


Záver

Dúfam, že tieto informácie, program sa čitateľom páčil (Zdieľajte, lajkujte). Na internete nenájdete bežne program s otvoreným kódom na efektívne preverovanie obrovských čísel.

Large number factorization

Introduction

This part is dedicated to factorization of large numbers into a product of primes (prime factorization). Every number can be decomposed into a product of primes. This program was created in the Python programming language. It is a console program. To run it, you need to install Python, or run the program online through a browser. More about installing and running programs in Python can be found in the article: Mathematics in Python.

This program is a necessary, partial foundation for verifying the Riemann Hypothesis (in connection with articles Validity of the Riemann Hypothesis and Riemann Hypothesis – validity (part 3)). The number factorization program uses an algorithm for finding extreme primes. Factorizations of extremely large numbers are very computationally demanding. Complete factorization (computation time) depends mainly on whether the number contains very large primes in its factorization. Later, this piece of code will be added to the calculation of the Gay - Robin index for very large numbers in connection with articles on the validity of the Riemann Hypothesis.


Program Source Code

Screenshot - 5_ 8
Fig.1 Sample of program code in Python

Version No.1:
download Python file: number_decomposition.py
View code in ".txt" format: number_decomposition.txt
or download code from GitHub: link

Description: The algorithm contains number factorization into primes and subsequent output of the factorization.


Examples of Extreme Factorizations

Screenshot - 5_ 8 002
Fig.2 Example of extreme factorization.

The example in the image took less than a second. This number is one of the largest for which we know that the Gay-Robin index reached a high value, index = 1.757 (details in the article Validity of the Riemann Hypothesis).


Conclusion

I hope that this information and program were liked by readers (Share, like). You will not commonly find a program with open code on the internet for efficiently verifying huge numbers.