Number theory function
Rounding function
definition
For real numbers \ (x \) , remember \ (⌊x⌋ \) is not more than \ (x \) the largest integer.
\ (\ lfloor x \ rfloor \ ) unique integer also satisfies the following relationship:
\ (\ lfloor X \ rfloor ≤x <\ lfloor X \ rfloor. 1 + \)
For any positive integer \ (n-\) , \ (. 1 \) to the \ (n-\) in \ (D \) multiples are \ (⌊ \ frac {n} {d} ⌋ \) th
Property 1
For any \ (x \) and positive integers \ (A \) , \ (b \) , we have:
\[ ⌊⌊\frac{x}{a}⌋/b⌋ = ⌊\frac{x}{ab}⌋ \]
Property 2
\ (⌊ \ frac {n} {d} ⌋ \) may not exceed the value 2√n species.
prove
For any positive integer \ (n-\) , consider when \ (1≤d≤n \) when, \ ({⌊ n-} \ {D} FRAC ⌋ \) different numbers of values.
If \ (d ≤ \ n-sqrt \) , can be obtained in the \ (⌊ \ frac {n} {d} ⌋ \) no more than \ (\ sqrt n \) species.
If \ (D> \ n-sqrt \) , then \ (⌊ \ frac {n} {D} ⌋≤ \ {n-FRAC} {D} <\ n-sqrt \) , and because \ (⌊ \ frac {n} {d} ⌋ \) is a positive integer, so at this time
may not exceed the values \ (\ sqrt n \) species.
In summary, \ (⌊ \ {n-FRAC ⌋} {D} \) may not exceed the value \ (2 \ sqrt n \) species.
Harmonic number
\[ \begin{align} &H_{n}=\sum_{k=1}^{n}\frac{1}{k}\\ &=\ln n+\gamma+o(1) \end{align} \]
Release can be:
\ [\ align = left the begin {} \ sum_. 1} = {D} ^ {n-\ lfloor \ {n-FRAC} {D} \ rfloor = \ Theta (n-logN) \ End align = left {} \]
Prime-counting function
Defined prime number theorem &
So prime-counting function \ (\ pi (n) \ ) represents not more than \ (n-\) number of prime numbers. We have the following prime number theorem:
\[ \pi(n)\sim\frac{n}{\ln n} \]
inference:
\ (n-\) primes density near approximately \ (\ FRAC. 1 {{} \} n-LN \) .
The first \ (n-\) prime numbers \ (n-P_ {} \ n-SIM \ n-LN \) .
Multiplicative function
definition
Set \ (F \) is the arithmetical function, if for any positive integers coprime \ (A, B \) , are \ (F (ab &) = F (A) F (B) \) , called $ f $ is a multiplicative function.
If for any positive integer \ (A, B \) , are \ (F (ab &) = F (A) F (B) \) , $ f $ is called complete integrability.
Unit functions
definition
Unit function \ (\ epsilon (n) \ ) is defined as:
\ [\ the begin {align = left} \ Epsilon (n-) = [n-=. 1] = \ left \ {\ the begin {Matrix} &. 1, n-=. 1; \\ & 0, n \ neq1. \ end {matrix} \ right. \ end {align} \]
Divisor function
definition
Divisor function \ (\ sigma_ {k} \ ) to indicate \ (n-\) a factor \ (K \) th power and:
\[ \begin{align} \sigma_{k}(n)=\sum_{d|n}d^{k} \end{align} \]
Submultiple number \ (\ sigma_ {0} ( n) \) is often referred to as \ (D (n-) \) , and about the number \ (\ sigma_ {1} ( n) \) is often referred to as \ (\ Sigma (the n-) \) .
Divisor function is multiplicative function.
\ (Euler \) function
definition:
\ (The Euler \) function \ (φ (n) \) represents not more than \ (n-\) and the \ (n-\) prime number is a positive integer.
By the (n-\) \ decomposition combined inclusion and exclusion criteria, we can get \ (the Euler \) function of the expression: \ [\ varphi (n-) = n-\ CDOT \ prod_ {I} = ^ {S}. 1 (1- \ frac {1} { p_ {i}}) \]
Wherein \ (n = p_ {1} ^ {\ alpha_1} p_ {2} ^ {\ alpha_2} · · · p_ {s} ^ {\ alpha_s} \) is \ (n-\) standard decomposition.
Thus easy to see that \ (Euler \) function is a multiplicative function.
Property 1
For any n-$ \ (, \) the Euler $ function has the following properties:
\[n=\sum_{d|n}\varphi(d)\]
Proof 1
The \ (1 \) to the \ (n-\) all integers in accordance with the \ (n-\) classification of the greatest common divisor.
If \ (GCD (n-, I) = D \) , then the \ (GCD (\ {n-FRAC} {D}, \ FRAC {I} {D}) =. 1 \) . But \ (\ frac {i} { d} \) does not exceed \ (\ frac {n} { d} \) is an integer, so that such \ (I \) have \ (φ (\ frac {n } {d}) \) a.
Consider all \ (D | n-\) , we also took into account all \ (1 \) to the \ (n-\) between \ (n-\) integer, therefore \ [n = \ sum_ {d | n } \ varphi (\ frac {n } {d}) = \ sum_ {d | n} \ varphi (d) \] That is:
\ [Id = \ varphi. 1 * \]
Proof 2
Possible to prove \ (f (n) = \ sum_ {d | n} \ varphi (d) \) is a multiplicative function, then certificate for prime \ (P \) , there are
\ [f (p ^ c) = \ sum_ {d | p ^ c } \ varphi (d) = \ varphi (1) + \ varphi (p) + \ varphi (p ^ 2) + ... + \ varphi (p ^ {c-1}) = p ^ c \]
can be obtained by defining the sum of geometric series, readily available and conclusions
Tips, study a multiplicative function, to study its performance in the power of a substance.
Property 2
\ (the p-| the n-\) , then \ (\ varphi (NP) = \ varphi (the n-) the p-\) .
Use are:
\(\varphi(p^k)=(p-1)p^{(k-1)}\)
Code:
phi[t]=phi[i]*(i%p[j]?p[j]-1:p[j]);
\ (Mobius \) function
Mobius defined function:
\ [\ MU (n-) = \ the aligned the begin {} = n-&&. 1. 1 & & \\ 0 && have perfect square factor \\ & (- 1) ^ p && is distinct prime factors p product \\ \ end {aligned} \]
first saw this when I was ignorant force, this function does not feel so natural, I do not know why there is this function ......
But in fact, it is often a function \ (1 \) the inverse of that $ \ mu * 1 = \ epsilon $.
Derivation and specifically can be seen here . (In fact, it seems to be a kind of inclusion and exclusion?)
This meets the need for Möbius inversion.
Multiplicative inverse function:
If \ (F * G = \ Epsilon \) , then \ (F \) and \ (G \) reciprocal.
Mobius inversion
Existing relationships:
\ [\ Begin {align} F
(n) = \ sum_ {d | n} f (d) \ end {align} \] That is:
\ [F. = F *. 1 \]
If we easily find \ (F \) then you can easily find \ (F \) , on the contrary, if \ (F \) easy to ask, how do we find \ (f \) ?
\ [F * \ mu = f
* 1 * \ mu = f * \ epsilon = f \] multiple Mobius inversion:
If:
\ [F. (N-) = \ sum_ {n-| D} F (D) \]
is:
\ [F (n-) = \ sum_ {n-| D} \ MU (D / n-) F. (D) \ ]
also:
If:
\ [F. (N-) = \ sum_ {K =. 1} ^ {\ infty} F (KN) \]
is:
\ [F (n-) = \ sum_ {K =. 1} ^ {\ infty} \ MU (k) f (kn) \ ]
Tips:
\ [[GCD (I, J) =. 1] = \ sum_ {D | GCD (I, J)} \ MU (D) \]
Proof:
由\ (\ mu * 1 = \ epsilon \) ,
即 \(\sum_{d|n}\mu(d)=[n=1]\),
The \ (n-\) replaced by \ (gcd (i, j) \) is the formula.
Then \ (d | gcd (x, y) \) can be converted to \ (D | X, D | Y \) ,
Then often the enumeration \ (D \) to The \ (I \) , \ (J \) contribution to seek an answer block.
main idea:
The use of " exchange-fit order " and " change enumeration " to simplify.
Block number theory
Specific not write, summary records prove that thinking, well, do not write.
More topics and skills will write