Riddles of numbers have long agitated the minds of people, and prime numbers occupy a vast and important part of them. All positive integers refer to natural numbers, which, in turn, are divided by:
Prime numbers - divisible only by 1 and itself (for example, 2,3,5,7,11, ...);
Composite numbers - divisible by 1, itself and have at least one more divisor (for example 4,6,8,9, ...). Here are some postulates about prime numbers:
- Unit is not a prime number;
- Any integer greater than one is either prime or has a prime divisor (composite numbers);
- Any composite number can be represented as a product of prime numbers.
At the moment, there is no known algorithm that allows you to quickly decompose a very large number into prime factors.
The method of iterating over the divisors is poorly suited for very large numbers, due to its high resource consumption, for example 10 300 +1. This property is used in some encryption algorithms such as RSA.
Maybe you will be able to solve the mysteries of prime numbers ...