Speaking from basic arithmetical function 1: divisible block, arithmetical function, Dirichlet convolution

In this article: divisible block, several common arithmetical functions and Dirichlet convolution.

Block divisible

On the related number in question, often encounter with ({i} \ rfloor \ \ lfloor \ frac {n}) \ summation formula. While taking into account the number \ (I \) , their \ (\ lfloor \ frac {n } {i} \ rfloor \) are the same (up to \ (\ lfloor2 \ sqrt {n } \ rfloor \) a) . It may be (O (\ sqrt {n} ) \) \ solution (if the remaining portion may be within a time \ (O (1) \) if calculated). You can see the following code:

for( int x = 1, y; x <= N; x = y + 1 ) {
    y = min( N / ( N / x ), M / ( M / x ) );
}

Number theory function

definition

Domain is a positive integer function of number theory function .

If \ (\ FORALL A, B, \ GCD (A, B) =. 1 \) , there are \ (F (ab &) = F (A) F (B) \) , the called function is a multiplicative function , if \ (\ FORALL A, B \) , there are \ (F (ab &) = F (A) F (B) \) , this function is called complete multiplicative function .

Case

Unit function \ (E (n-) = [n-=. 1] \) . (When \ ([] \) of the true value, the value is \ (1 \) , otherwise \ (0 \) .) Is completely multiplicative function.

Power function \ (id_k (n-) = n-K ^ \) . Is completely multiplicative function.

Euler function \ (\ Phi (n-) = \ SUM \ limits_. 1} ^ {n-I = [\ GCD (n-, I) =. 1] \) . It is a multiplicative function.

prove:

Set \ (\ Phi (n-) nN = \) , \ (\ Phi (m) mM = \) . (I.e. \ (n-\) is not \ (1 \) factor has \ (N \) th, \ (m \) is not \ (1 \) factor has \ (M \) a.) So \ ( nm \) is not \ (1 \) factor has \ (nM + mN-mN \ ) th (inclusion and exclusion).

\ (\ phi (nm) = nm-nM-mN + NM = \ phi (n) \ phi (m) \)

Divisor function \ (\ sigma_k (n-) = \ SUM \ limits_ {D | n-K} D ^ \) . Or referred to as \ (D (n-), \ of tau (n-) \) , is a multiplicative function.

prove:

Because of \ (\ GCD (n-, m) =. 1 \) , then the \ (\ FORALL A | n-, B | m \) , are \ (\ GCD (A, B) =. 1 \) . Then \ (n-\) is multiplied by a factor \ (B \) factor is \ (nm \) factor, and will not be repeated. Therefore, \ (\ sigma_k (n-) \ sigma_k (m) = \ sigma_k (nm) \) .

Mobius function \ (\ MU (n-) \) . When \ (n-\) has a square-time \ (\ MU (n-) = 0 \) . Otherwise \ (\ MU (the n-) = (- 1) ^ \ Omega (the n-) \) . Wherein \ (\ omega (n) \ ) represents \ (n-\) the number of different quality factors.

Proof ordinary, slightly.

Dirichlet convolution (Dirichlet convolution)

definition

Two arithmetic functions \ (f, g \) is defined as the Dirichlet convolution

\[ (f*g)(n)=\sum\limits_{d|n}f(d)g(\frac{n}{d}) \]

It can also be written like this:

\[ (f*g)(n)=\sum\limits_{ij=n}f(i)g(j) \]

nature

Commutative: \ (F * F * G = G \) .

Associativity: \ ((F * G) = F * H * (G * H) \) .

Units function unit element: \ (F * E F = \) .

Distributive law: \ (F * (G + H) + = F * F * G H \)

When \ (F \) and \ (G \) are multiplicative function is \ (f * g \) is also multiplicative function. Conversely, if the \ (h = f * g \ ) is a multiplicative function, \ (F \) is a multiplicative function, then \ (G \) is also multiplicative function.

prove:

As already mentioned, if \ (\ GCD (n-, m) =. 1, A | n-, B | m \) , then the \ (\ GCD (A, B) =. 1 \) .

\[ \begin{aligned} (f*g)(n)\times (f*g)(m) &= \sum\limits_{i_1j_1=n}f(i_1)g(j_1)\times \sum\limits_{i_2j_2=m}f(i_2)g(j_2)\\ &= \sum\limits_{i_1i_2j_1j_2=nm}f(i_1)f(i_2)g(j_1)g(j_2)\\ &= \sum\limits_{ij=nm}f(i)g(j)\\ &= (f*g)(n) \end{aligned} \]

Two equations

\ [\ Sigma_k id_k * = 1 \]

Proof: slightly

\ [E = \ mu * 1 \]

prove:

If \ (n-\) have \ (K \) distinct prime factor, then

\[ \sum\limits_{d|n} \mu(d) = \sum\limits_{i=0}^k (-1)^i \times {k\choose i} \]

The binomial theorem, \ ((1-1 of) = ^ K \ SUM \ limits_ ^ {K} I = 0 (-1) ^ I \ Times {K \ I} = 0 the Choose ^ K \)

And because \ (\ MU (. 1). 1 = \) , so \ (\ mu * 1 = e \)

Guess you like

Origin www.cnblogs.com/chy-2003/p/11831478.html