Mathematical Notes - number theory (a)

For some well-known reasons, which are listed icpc often jian guo with a simple number theory knowledge, should never be proven, not even rigorous, such as special numbers 0 and 1 of this judgment, it is based on the actual situation of special treatment. After all, only pay attention to applications without concern beautiful theory.

Factor

If there exists an integer \ (K \) , so \ (n-KD = \) , called \ (D \) divides \ (n-\) , or \ (D \) is \ (n-\) is a factor.

However, because of the number are the general topics of the middle finger, there will be some wonderful title negative factor in the operation in a negative sense die strange.

Prime number

Exactly two positive integer numbers for this reason.

Some common prime numbers: 998,244,353 (the original root is 3), 1e9 + 7,1e9 + 9,19260817,10007,10009

Determining \ (n-\) is the method is not a prime number:

\ (O (\ sqrt {n }) \) then enumerated directly after the decomposition, pretreated prime number decomposition of the precursor (The prime number theorem seems to be a little faster, but no use, but also \ (O (\ {n} sqrt) \) ), Miller-Rabin algorithm.

The number of case

Positive integer greater than 2 because of the number.

Number of bonded decomposition method:

Similarly prime number and verification, Pollard-Rho algorithm.

As we all know, 1 is neither prime nor composite, but in many cases it has similar performance with the prime number (such as various arithmetical functions), but because it is the fundamental theorem of arithmetic and some connection, it is easy to separate.

So 0 is a prime number or a composite number it? It should be a prime number composite number is a positive integer these concepts will apply it. Anyway, it is a special case of special judge on it. (0 behaved strangely in some functions, such as factorial, should act as a unit element of the role, rather than simply believe all function value is 0)

Prime number theorem

\ (X \) or less (generally considered " \ (X \) within" refer to \ ([. 1, X] \) ) the number of prime numbers, referred to as \ (\ PI (X) \) , prime number theorem gives a good estimate of this function \ (\ PI (X) \ SIM \ FRAC {X} {\ LN (X)} \) , the \ (\ LN \) obviously refers to the natural logarithm.

The number of common prime number prime number, the number of prime numbers less than 1e5 not exceed 9.6e3,1e7 within no more than 6.7e6,1e9 within no more than 5.1e7.

Appeared to be some linear alkylene sieve can be determined \ (n-\) number of prime numbers within. More precisely, at least min25 screen can be quickly and accurately determined within the 1E11 \ (\ PI (the X-) \) . (Deformation min25 screen seems to solve a lot of non-multiplicative function prefix and problems)

References:

Prime - OI Wiki

Guess you like

Origin www.cnblogs.com/KisekiPurin2019/p/11804413.html