Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Extended Euclidean algorithm (extended_gcd)

Greatest common divisor of two whole numbers with the multipliers that give it.

How to write it

extended_gcd(a, b)

a
A whole number. Takes a whole number.
b
A whole number. Takes a whole number.

Examples

  • extended_gcd⁡(12,18)=[6,[−1,1]]\displaystyle \operatorname{extended\_gcd}(12, 18) = \left[ 6, \left[ -1, 1 \right] \right]
    extended_gcd(12, 18)

    In the solver, extended_gcd(12, 18) gives [6, [-1, 1]].

    Open in the solver
  • factor_integer

    Prime factorization of a whole number, as a list of prime and exponent pairs.

  • euler_phi

    Euler's totient: how many whole numbers up to n are coprime to n.

  • fibonacci

    The n-th Fibonacci number, with F(1) = F(2) = 1.

  • euler_e

    The n-th Euler number.

  • from_continued_fraction

    The number a continued fraction stands for.

  • divisors

    The positive divisors of a whole number, in increasing order.