ω = [a0,...,ap-1,\overline{b0,...,bq-1}].
Here the pre-period, a0,...,ap-1 consists of integers, with a1,...,ap-1 positive if p > 1.If there is no pre-period, simply enter 0 0 in the pre-period box below.
The construction.
Let ζ be the purely periodic reduced (ie. ζ > 1 & -1 < ζ′ < 0) quadratic irrational defined by
ζ = [\overline{b0,...,bq-1}].
Thenζ = (Aq-1ζ + Aq-2)/(Bq-1ζ + Bq-2),
where An/Bn is the n-th convergent to ζ. (See O. Perron, Kettenbrüche, Zweite verbesserte Auflage, Seite 69.)This gives a quadratic equation:
Bq-1ζ2 + (Bq-2 – Aq-1)ζ – Aq-2 = 0.
Solving for ζ givesζ = (Aq-1 - Bq-2 + √{(Aq-1 – Bq-2)2 + 4Aq-2Bq-1}) / 2Bq-1.
Thenω = (Ap-1ζ + Ap-2)/(Bp-1ζ + Bp-2),
where An/Bn is the n-th convergent to ω. (See O. Perron, Kettenbrüche, Zweite verbesserte Auflage, Seite 85.)We print ω in standard form (u+√d)/v, where v divides d - u2 and gcd(u,v,(d-u2)/v = 1.
Last modified 4th February 2013
Return to main page