Number Theory formula reference

Euclidean Algorithm

Computes a greatest common divisor by repeated remainders.

Open in editor
LaTeX\gcd(a,b)=\gcd(b,a\bmod b)

Variables

  • a,b: integers
  • mod: remainder operation

How to use this formula

Computes a greatest common divisor by repeated remainders.

Important notes

  • The displayed recurrence is applied until the remainder is zero.

Quick example

gcd(48,18)=6.

Applicability, worked calculation, and verification

Assumptions and domain checks

  • The displayed recurrence is applied until the remainder is zero.
  • Apply the formula over the intended integer domain and check divisibility, coprimality, parity, or modulus conditions.

Worked example

Input

Output

gcd(48,18)=6.

Common mistakes

  • Before substituting values into Euclidean Algorithm, map each variable to its definition and preserve every sign, exponent, subscript, and grouping mark.
  • Verify the result of Euclidean Algorithm with a known case, inverse operation, dimensional check, or independent calculation before publishing it.

Continue the workflow

Use Euclidean Algorithm in your own work

  1. Check the domainMatch the variables and assumptions to the problem before substituting values.
  2. Copy the exact notationPreserve grouping, signs, and exponents in \gcd(a,b)=\gcd(b,a\bmod b).
  3. Edit or convertOpen the expression in the LaTeX editor, then export it for your document or web page.

Review and verification

Last reviewed: 2026-07-23

Automated quality check: Kept noindex until the missing evidence is supplied.

Formula references

Frequently asked questions

What is the Euclidean Algorithm used for?

Computes a greatest common divisor by repeated remainders.

Can I copy this formula as LaTeX?

Yes. Copy \gcd(a,b)=\gcd(b,a\bmod b) or open it in the LaTeX editor.

What should I check before using it?

Confirm that each variable, unit, domain restriction, and assumption matches the problem.

Reuse, attribution, and correction

Share this reference without losing its source

Copy a citation, permanent link, Markdown link, or self-contained embed card. Each reusable format points readers back to the maintained canonical page.

Report an issue

Search the whole reference

Symbols, formulas, guides, tools and commands

Start typing to search.

move · Enter open · Esc close