Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-sonnet-4-20250514-thinking-32k· AnthropicHugging Face LMArena Human Preference 140K

if i have a continued fraction a/b = (c0,c1,c2,...,cn), to what fraction does the…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with grok-3-mini-beta’s answer.
  1. User

    if i have a continued fraction a/b = (c_0,c_1,c_2,...,c_n), to what fraction does the continued fraction (c_n,c_{n-1},c_{n-2}...,c_0) correspond?

  2. Claude Assistant

    Looking at this problem, I need to find the relationship between a continued fraction and its "reverse."

    Let me work through this systematically using the convergents of the original continued fraction.

    For a continued fraction [c₀; c₁, c₂, ..., cₙ], the convergents pₖ/qₖ are computed using:

    • p₋₁ = 1, p₀ = c₀
    • q₋₁ = 0, q₀ = 1
    • pₖ = cₖpₖ₋₁ + pₖ₋₂
    • qₖ = cₖqₖ₋₁ + qₖ₋₂

    The value of the continued fraction is pₙ/qₙ.

    Let me test this with some examples:

    Example 1: [1; 2, 3]

    • p₀ = 1, q₀ = 1
    • p₁ = 2(1) + 1 = 3, q₁ = 2(1) + 0 = 2
    • p₂ = 3(3) + 1 = 10, q₂ = 3(2) + 1 = 7

    So [1; 2, 3] = 10/7

    The reverse is [3; 2, 1] = 3 + 1/(2 + 1/1) = 3 + 1/3 = 10/3

    Example 2: [2; 1, 3]

    • p₀ = 2, q₀ = 1
    • p₁ = 1(2) + 1 = 3, q₁ = 1(1) + 0 = 1
    • p₂ = 3(3) + 2 = 11, q₂ = 3(1) + 1 = 4

    So [2; 1, 3] = 11/4

    The reverse is [3; 1, 2] = 3 + 1/(1 + 1/2) = 3 + 2/3 = 11/3

    I notice a pattern: the numerators are the same! Looking at the denominators:

    • [1; 2, 3] = 10/7, [3; 2, 1] = 10/3, where 3 = p₁
    • [2; 1, 3] = 11/4, [3; 1, 2] = 11/3, where 3 = p₁

    This suggests that if [c₀; c₁, ..., cₙ] = pₙ/qₙ, then [cₙ; cₙ₋₁, ..., c₀] = pₙ/pₙ₋₁.

    Let me verify with a simpler case: [2; 3] = 7/3, with p₁ = 7, p₀ = 2 [3; 2] = 7/2 = p₁/p₀ ✓

    Answer: If the continued fraction [c₀; c₁, c₂, ..., cₙ] equals a/b, then the reversed continued fraction [cₙ; cₙ₋₁, cₙ₋₂, ..., c₀] equals pₙ/pₙ₋₁, where pₙ/qₙ = a/b and pₙ₋₁/qₙ₋₁ is the penultimate convergent of the original continued fraction.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.