Skip to content
← All questions

What is the recurrence formula for the greatest common divisor of two integers a and b for any integer k?

The recurrence formula states that for any integer k, the greatest common divisor of a and b is equal to the greatest common divisor of b and a minus k times b. This identity allows the first argument to be replaced by an integer linear combination of the original arguments, preserving the GCD.

Conditions

  • a and b are integers.
  • k is any integer.

Reasoning, step by step

  1. Identify the two integers a and b.
  2. Choose an arbitrary integer k.
  3. Compute the new second argument as a−k∗ba - k * b.
  4. Apply the identity gcd(a, b) = gcd(b, a−k∗ba - k * b).

Example

The video presents the formula: "For any integer k: gcd(a,b)=gcd(b,a−k⋅ba-k\cdot b)".

Common misconceptions

  • Believing that k must be positive; the formula holds for any integer k, including negative values.
  • Thinking that the formula changes the value of the GCD; it is an invariant transformation.

Watch the explanation

Connected concepts

Explore next

Related questions

Meet the concept

↗
Find a method

↗
Find a method

↗
Find a method

↗
Meet the concept

↗

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.