Help


[permalink] [id link]
+
Page "Greatest common divisor" ¶ 64
from Wikipedia
Edit
Promote Demote Fragment Fix

Some Related Sentences

gcd and is
This representation is convenient for expressions like these for the product, gcd, and lcm:
In mathematics, the greatest common divisor ( gcd ), also known as the greatest common factor ( gcf ), or highest common factor ( hcf ), of two or more non-zero integers, is the largest positive integer that divides the numbers without a remainder.
Greatest common divisors can in principle be computed by determining the prime factorizations of the two numbers and comparing factors, as in the following example: to compute gcd ( 18, 84 ), we find the prime factorizations 18 = 2 · 3 < sup > 2 </ sup > and 84 = 2 < sup > 2 </ sup > · 3 · 7 and notice that the " overlap " of the two expressions is 2 · 3 ; so gcd ( 18, 84 ) = 6.
A much more efficient method is the Euclidean algorithm, which uses a division algorithm such as long division in combination with the observation that the gcd of two numbers also divides their difference.
Then divide 12 by 6 to get a remainder of 0, which means that 6 is the gcd.
* Every common divisor of a and b is a divisor of gcd ( a, b ).
* If m is a non-negative integer, then gcd ( m · a, m · b ) = m · gcd ( a, b ).
* If m is any integer, then gcd ( a + m · b, b ) = gcd ( a, b ).
* If m is a nonzero common divisor of a and b, then gcd ( a / m, b / m ) = gcd ( a, b )/ m.
* The gcd is a commutative function: gcd ( a, b ) = gcd ( b, a ).
* The gcd is an associative function: gcd ( a, gcd ( b, c ))
* gcd ( a, b ) is closely related to the least common multiple lcm ( a, b ): we have
: This formula is often used to compute least common multiples: one first computes the gcd with Euclid's algorithm and then divides the product of the given numbers by their gcd.

gcd and multiplicative
This is multiplicative if the set C has the property that if a and b are in C, gcd ( a, b )= 1, than ab is also in C. This is the case if C is the set of squares, cubes, or higher powers, or if C is the set of square-free numbers.
In number theory, given an integer a and a positive integer n with gcd ( a, n ) = 1, the multiplicative order of a modulo n is the smallest positive integer k with
* Gauss sums are multiplicative, i. e. given natural numbers a, b, c and d with gcd ( c, d )
This can, for example, be proven as follows: Because of the multiplicative property of Gauss sums we only have to show that if n > 1 and a, b are odd with gcd ( a, c )= 1.
The condition gcd is equivalent to requiring that the map on is one to one and its inverse is the map where is the multiplicative inverse of.

gcd and function
* gcd ( n, k ): the greatest common divisor of n and k, as a function of n, where k is a fixed integer.
In number theory, Euler's totient or phi function, φ ( n ) is an arithmetic function that counts the number of positive integers less than or equal to n that are relatively prime to n. That is, if n is a positive integer, then φ ( n ) is the number of integers k in the range 1 ≤ k ≤ n for which gcd ( n, k ) = 1.

gcd and following
The following is an example of an integral domain with two elements that do not have a gcd:

gcd and if
If R is an integral domain then any two gcd's of a and b must be associate elements, since by definition either one must divide the other ; indeed if a gcd exists, any one of its associates is a gcd as well.
However if R is a unique factorization domain, then any two elements have a gcd, and more generally this is true in gcd domains.
has a solution for x if and only if b is divisible by the greatest common divisor d of a and n ( denoted by gcd ( a, n )).
An integral domain is a Bézout domain if and only if any two elements in it have a gcd that is a linear combination of the two.
This means that if gcd ( m, n )
However, if gcd ( v, n ) is neither 1 nor n, then the-addition will not produce a meaningful point on the curve, which shows that our elliptic curve is not a group ( mod n ), but, more importantly for now, gcd ( v, n ) is a non-trivial factor of n.
This calculation is always legal and if the gcd of the-coordinate with is unequal to 1 or, so when simplifying fails, then a non-trivial divisor of is found.
: if gcd ( n, k )
: if gcd ( n, k ) > 1.
* m and n are coprime ( also called relatively prime ) if gcd ( m, n ) = 1 ( meaning they have no common prime factor ).
It also follows from defining a and b as coprime if gcd ( a, b )= 1, so that gcd ( 1, b )= 1 for any b >= 1.

gcd and 1
< li > If gcd ( a, N )1, then there is a nontrivial factor of N, so we are done .</ li >
< li > gcd ( a < sup > r / 2 </ sup > ± 1, N ) is a nontrivial factor of N. We are done .</ li >
For example: :, gcd ( 4 ± 1, N )
1 since gcd ( 1, 1 ) = 1.
Proof: Since p is a prime number the only possible values of gcd ( p < sup > k </ sup >, m ) are 1, p, p < sup > 2 </ sup >, ..., p < sup > k </ sup >, and the only way for gcd ( p < sup > k </ sup >, m ) to not equal 1 is for m to be a multiple of p. The multiples of p that are less than or equal to p < sup > k </ sup > are p, 2p, 3p, ..., p < sup > k − 1 </ sup > p = p < sup > k </ sup >, and there are p < sup > k − 1 </ sup > of them.

gcd and 2
To compute gcd ( 48, 18 ), divide 48 by 18 to get a quotient of 2 and a remainder of 12.
In this case the probability that the gcd equals d is d < sup >− 2 </ sup >/ ζ ( 2 ), and since ζ ( 2 ) = π < sup > 2 </ sup >/ 6 we have

gcd and are
* gcd ( a, b ), where a and b are not both zero, may be defined alternatively and equivalently as the smallest positive integer d which can be written in the form d = a · p + b · q where p and q are integers.
In a ring all of whose ideals are principal ( a principal ideal domain or PID ), this ideal will be identical with the set of multiples of some ring element d ; then this d is a greatest common divisor of a and b. But the ideal ( a, b ) can be useful even when there is no greatest common divisor of a and b. ( Indeed, Ernst Kummer used this ideal as a replacement for a gcd in his treatment of Fermat's Last Theorem, although he envisioned it as the set of multiples of some hypothetical, or ideal, ring element d, whence the ring-theoretic term.
and a random integer, r, such that gcd ( r, q ) = 1 ( i. e. r and q are coprime ).
* If we encountered a gcd ( v, n ) at some stage that was neither 1 nor n, then we are done: it is a non-trivial factor of n.
So all prime numbers are of the form 30k + i for i = 1, 7, 11, 13, 17, 19, 23, 29 ( i. e. for i < 30 such that gcd ( i, 30 ) = 1 ).
* gcd ( m, n ) ( greatest common divisor of m and n ) is the product of all prime factors which are both in m and n ( with the smallest multiplicity for m and n ).
Note that gcd ( x, N )= 1 with overwhelming probability, which ensures that there are 4 square roots of x < sup > 2 </ sup > mod N.

0.176 seconds.