Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Lesson 18 of 30

Turn division into a continued fraction

Compute finite continued fractions by Euclidean division.

Loading your saved responses…

Try the optional starting-point checks and targeted refreshers. You can continue directly into this lesson.

Try

Convert forty-three nineteenth parts into whole groups and a remainder. The division 43=2·19+5 says 43/19=2+5/19. Instead of rounding the fraction, invert its remainder: 19/5=3+4/5. Repeat with 5/4=1+1/4 and then four. The resulting expression [2; 3, 1, 4] means 2+1/(3+1/(1+1/4)). Evaluate it from the bottom upward to check the original rational number.

Predict

Predict what makes this procedure stop. A decimal expansion can repeat forever for a rational number, but Euclidean remainders cannot decrease forever through positive integers. Conversely, if an irrational number produced a zero fractional part after finitely many reciprocal steps, reversing those steps would express the original input as a rational number. Termination therefore distinguishes rational from irrational inputs in exact arithmetic, not in rounded numerical computation.

Experiment

Reconstruct the numerator at each division and check that every remainder is smaller than its divisor.

DividendDivisorQuotientRemainder
431925
19534
5411
4140

Then evaluate the tails: four; five-fourths; nineteen-fifths; forty-three nineteenth parts. The quotients are the continued-fraction coefficients. The remainder table is an exact trace, not merely a recipe for producing a plausible approximation.

Understand

For a real number α, set a0=floor(α). If α−a0 is nonzero, replace α by 1/(α−a0), take its floor as a1, and continue. The original integer part can be negative; all later coefficients are positive integers because each reciprocal exceeds one. A rational input follows the Euclidean algorithm after numerator and denominator are reduced, and strict remainder descent proves termination. Every finite continued fraction with positive later entries is rational by backward substitution. These arguments also explain why a finite-precision calculator cannot certify irrationality: a stored decimal is itself rational and eventually terminates if treated exactly.

Apply

There is a controlled ambiguity at the end. A final coefficient a≥2 can be replaced by a−1 followed by one, since a−1+1/1=a. Thus [2; 3, 1, 4] also equals [2; 3, 1, 3, 1]. Requiring the final coefficient to be at least two gives the usual canonical representation for noninteger rationals. Interior coefficients equal to one are allowed. For a negative input such as −7/3, floor gives −3 and fractional part two-thirds; the next reciprocal is three-halves. Truncation toward zero would give a negative remainder and break the positive-tail convention.

Continue

Write a small exact algorithm on paper using a pair of integers rather than decimals: divide, record the quotient, and exchange divisor and remainder. Test a negative numerator, an integer, and a fraction already in lowest terms. The next lesson turns these coefficients into approximants and proves determinant identities. Periodicity for quadratic irrationals is a further theorem, not a consequence of rational termination. We will use exact square-root recurrences in the Pell exploration while proving the required existence statement separately.

Return to the number theory unit to choose a targeted retry. Continue with prove why convergents are close and reduced.

Apply · explain · revise

Practice and reasoning

Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.

Find the integer part of 58/21.

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

Find the last coefficient in the canonical continued fraction of 58/21.

Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.

Prove the continued fraction algorithm terminates for a rational input.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Prove a finite simple continued fraction is rational.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Explain [a0;…, an]=[a0;…, an−1, 1] when an≥2.

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Why use floor rather than truncation for a negative initial value?

Structure your argument and preserve revisions

These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.

Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.

Reflect and continue

Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.