标签:公式 over 证明 rod play 最大公约数 去除 lin rac
\(gcd(a, b) == gcd(b, a\%b)\)
证明:
设: \(d\)为\(a\)与\(b\)的一个公约数, 则有\(d|b\) \(d|a\)
设: \(a = k \times b + r\) 则有\(r = a \% b\)
\(r = a - kb\) 同除以\(d\)可得
\(r \over d\) \(=\) $ a \over d$ \(-\) \(kb\over d\)
又$ \because d|b , d|a$
\(\therefore d | r\)
即 \(d | a\%b\), \(d\)为\(a\%b\)的一个因数.
又 \(\because d|b\)
\(\therefore d\) 为\(b\)与\(a\%b\)的一个公约数,
若\(d\)最大,则\(d\)为\(b\)与\(a\%b\)的最大公约数,
\(\therefore gcd(a, b) = gcd(b, a \% b)\) 得证
要使\(ax + by = m\)(\(a, b \in Z\)) 有整数解的充要条件是 \(m \% gcd(a, b) = 0\)
证明:
设\(d = gcd(a, b)\) 则 \(d | a \ d | b\) .
又\(\because x, y\) 为整数 \(\therefore d | ax + by\)
\(\because ax + by = m\) \(\therefore d | m\)
则 \(m \% gcd(a, b) = 0\).
当a 与 p互质的时候则有 \(a^{\varphi(p)} \equiv 1 \ (mod \ p)\)
通项公式及证明:
若\(n = p ^ k ,p\)为质数,则\(\varphi (p^k) = p ^k - p ^{k - 1}\)
当一个数不包含质因子\(p\)时就能与\(n\)互质,
小于等于\(n\)的数中包含质因子\(p\)的只有\(p^{k-1}\) 个,他们是:
\(p, 2*p, 3* p, ...,p ^{k - 1} ?p\),把他们去除即可.
由唯一分解定理可得: \(n = p_1 ^{a_1} p_2 ^{a_2}p_3 ^{a_3}...p_k ^{a_k}\)
则 \(\varphi (n) = \varphi(p_1^{a_1})\varphi(p_2^{a_2})\varphi(p_3^{a_3})...\varphi(p_k^{a_k})\)
根据上述\(\varphi (p^k) = p ^k - p ^{k - 1}\)可得:
$????????????\varphi (p) = p^k(1 - $\({1}\over {p^k}\))
则 \(\varphi (n) = \varphi(p_1^{a_1})\varphi(p_2^{a_2})\varphi(p_3^{a_3})...\varphi(p_k^{a_k})\)可化为
\(\ \ \ \ \varphi (n) = p_1 ^{a_1}(1 - \frac {1} {p_1}) p_2 ^{a_2}(1 - \frac {1} {p_2})p_3 ^{a_3}(1 - \frac {1} {p_3})...p_k ^{a_k}(1 - \frac {1} {p_k})\)
\(\ \ \ \ \ \ \ \ \ \ \ = n (1 - \frac {1} {p_1})(1 - \frac {1} {p_2})(1 - \frac {1} {p_3})...(1 - \frac {1} {p_k})\)
\(\displaystyle \prod^{k}_{i= 1} (a_i + 1)\)
证明:
由唯一分解定理\(n = p_1 ^{a_1} p_2 ^{a_2}p_3 ^{a_3}...p_k ^{a_k}\)可得:
\(n\)的约数一定是 \(p_1^{x} ... p_k^{z}\) \(x \in [0, a_1] ... z \in [0, a_k]\)
每一个可以取 \(a_i +1\)种可能.
根据乘法原理约数个数\(= (a_1 + 1) \ast (a_2 + 1) \ast ...\ast (a_k + 1)\).
即: \[\displaystyle \prod^{k}_{i= 1} (a_i + 1)\]
标签:公式 over 证明 rod play 最大公约数 去除 lin rac
原文地址:https://www.cnblogs.com/zzz-hhh/p/11725086.html