ArticleDirectory
- 1. maximum co-factor (GCD)
- 2. Definitions of intimacy data pairs
- 3. Implementation of intimate number pairs (Python)
1. GCD recursion theorem and proof
GCD recursion theorem refers to gcd (a, B) = gcd (B, A % B), where % indicates taking the remainder.
Proof:
We only need to prove that gcd (A, B) and gcd (B, A % B) can divide each other.
For gcd (a, B), it is the smallest positive element in the linear combination of A and B. gcd (B, A % B) is a linear combination of B and A % B, while a % B is a linear combination of A and B, gcd (B, A % B) is a linear combination of A and B, because, B can be divisible by gcd (a, B), so any linear combination of A and B can be divisible by gcd (a, B), so gcd (B, A % B) can be divisible by gcd (A, B. And vice versa.
2. Definitions of intimacy data pairs
If the factor of A and is equal to B, the factor of B and is equal to a, the factor includes 1 but does not include itself, and A is not equal to B, it is called a, B is the number of intimacy. Generally, the corresponding intimate number pair is obtained through the stacked generation programming.
3. Implementation of intimate number pairs (Python)
# Result:
# [(220,284), (1184,121 0), (2620,292 4), (5020,556 4), (6232,636 8)]