∑ZWMath CoursesSyllabusExercises
ES
ZWMath›Discrete mathematics›Recurrences and arithmetic›Euclidean algorithm›ZW-EUCLIDEAN-ALGORITHM-008
Course menu
AreaCombinatoricsCourseDiscrete mathematicsTopicRecurrences and arithmetic
Proofs and induction4
  • Direct proof
  • Proof by contradiction
  • Mathematical induction
  • Strong induction
Sets and relations4
  • Set operations
  • Inclusion-exclusion principle
  • Partial order relation
  • Hasse diagram
Counting8
  • Multiplication principle
  • Factorial
  • Permutations with repetition
  • Pigeonhole principle
  • Binomial coefficient
  • Binomial theorem
  • Combinations with repetition
  • Permutations and combinations Probability and statistics
Graph theory10
  • Graph
  • Degree of a vertex
  • Path in a graph
  • Connected graph
  • Tree
  • Eulerian cycle
  • Hamiltonian cycle
  • Bipartite graph
  • Graph coloring
  • Planar graph
Recurrences and arithmetic7
  • Recurrence relation
  • Divisibility
  • Greatest common divisor
  • Euclidean algorithm
  • Modular congruence
  • Homogeneous linear recurrence
  • Prime number

Exercise · ZW-EUCLIDEAN-ALGORITHM-008 · ★★☆ Intermediate

For any positive integer \(n\), what is \(\gcd(n,n+1)\)?

Choose one option.

Show answer
  • D. 1

← Back to the question

Explanation

\((n+1)\bmod n=1\), so the pair becomes \((n,1)\) and then \((1,0)\): the greatest common divisor is 1.

Study Discrete mathematics in ZWMath →

Review the concept: Euclidean algorithm

The Euclidean algorithm computes the greatest common divisor of two integers \(a\) and \(b\) by dividing repeatedly, replacing each pair by the divisor and the remainder, until the remainder is 0.

\[\gcd(a,b)=\gcd(b,\,a\bmod b)\]

More practice problems: euclidean algorithm

  • ZW-EUCLIDEAN-ALGORITHM-001 Compute gcd(252,105) with the Euclidean algorithm.
  • ZW-EUCLIDEAN-ALGORITHM-002 What is the remainder when 100 is divided by 36?
  • ZW-EUCLIDEAN-ALGORITHM-003 Applying the first Euclidean step to the pair (84,30), which pair results?
  • ZW-EUCLIDEAN-ALGORITHM-004 Compute gcd(1071,462).
  • ZW-EUCLIDEAN-ALGORITHM-005 How many divisions (the last with remainder 0) does the Euclidean algorithm need for gcd(1071,462)?
  • ZW-EUCLIDEAN-ALGORITHM-006 Compute gcd(391,221).
  • ZW-EUCLIDEAN-ALGORITHM-007 Reduce the fraction (143)/(221) to lowest terms.
  • ZW-EUCLIDEAN-ALGORITHM-009 Why does the Euclidean algorithm always terminate?

← ZW-EUCLIDEAN-ALGORITHM-007 ZW-EUCLIDEAN-ALGORITHM-009 →

Practice

⏱Exam simulator10 random questions with a grade☰All exercises
◉Open on course✦Open on free study↗Open on the map

ZWMath · Math from definition to practice. Open the interactive map · Syllabus · All exercises

Author: ORCID iD 0009-0009-8641-3511

Privacy · About Speedrunz · Contact