ConceptStep · learning platform for computer science

GCD, LCM and Euclid's algorithm

Mathematics — first biennium · Lesson

Numbers and arithmetic

GCD, LCM and Euclid's algorithm

The GCD can be found with successive divisions; the LCM follows quickly from the GCD.

Rule
Formula matematica
Example
Formula matematica
What you need to know before the exercises

In this lesson: Compute GCD and LCM while understanding Euclid's successive-division method.

How to proceed: For Euclid, divide the larger number by the smaller and replace the pair with divisor and remainder. When the remainder is 0, the last divisor is the GCD.

You can already assume: Divisibility and prime numbers.

Try it now

Find the GCD and LCM of 54 and 42.

Guided

Completed exercises: 0/5 · Correct on first attempt: 0

How to reason

For Euclid, divide the larger number by the smaller and replace the pair with divisor and remainder. When the remainder is 0, the last divisor is the GCD.

Formula matematica

You can write fractions as 3/4 and powers as 2^5.

Your competency map

What you need to know for GCD, LCM and Euclid's algorithm

ConceptStep separates what is required from what is recommended or useful as reinforcement. Only required prerequisites block your progress.

Current topic Strong skill Review due Needs reinforcement To be mastered Optional support

Relationships: solid line = required · dashed line = recommended · dotted line = reinforcement.

GUIDED LEARNING PATHS

Want to choose the next skill to develop?