cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A226164 Sequence used for the quadratic irrational number belonging to the principal indefinite binary quadratic form.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 6, 5, 6, 5, 6, 6, 7, 6, 7, 6, 7, 7, 8, 7, 8, 7, 8, 7, 8, 8, 9, 8, 9, 8, 9, 8, 9, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 12, 13, 12, 13, 12, 13, 12, 13, 12
Offset: 1

Views

Author

Wolfdieter Lang, Jul 20 2013

Keywords

Comments

For an indefinite binary quadratic form, denoted by [a, b, c] for F = F([a, b, c],[x, y]) = a*x^2 + b*x*y + c*y^2, the discriminant is D = b^2 - 4*a*c > 0, not a square. See A079896 for the possible values.
The principal form for a discriminant D, which is reduced (see the Scholz-Schoeneberg reference, p. 112), is defined as the unique form F_p(D) = [a=1, b(D), c(D)] with c(D) = -(D - b^2)/4. See the Buell reference, p. 26. One can show that b(D) = f(D) - 2 if D and f(D):=ceiling(sqrt(D(n))) have the same parity and b(D) = f(D) - 1 if D and f(D) have opposite parity. The principal root of a form [a, b, c] of discriminant D is omega(D) = (-b + sqrt(D))/2, the zero with positive square root of the polynomial P(x) = a*x^2 + b*x + c. See the Buell reference, p. 31 (and p. 18). We prefer to call omega the quadratic irrational belonging to the form F. For the principal form F_p(D) of discriminant D = D(n) = A079896(n), n >= 1, this quadratic irrational is omega_p(D(n)) = (-b(D(n)) + sqrt(D))/2 where b(D(n)) is the present sequence a(n). (Note that this differs from the omega = omega(D) used in the Buell reference on p. 40 because another form of discriminant D has been chosen there, depending on the parity of D.)
The (purely periodic) continued fraction expansion of omega_p(D(n)) plays a role for finding all solutions of the Pell equation x^2 + D(n)*y^2 = - 4 if a solution exists. See A226696 for these D values. For the Pell +4 equation which has solutions for every D(n) one finds the fundamental solution also from the continued fraction expansion of omega_p(D(n)).
For more details see the W. Lang link "Periods of indefinite Binary Quadratic Forms ..." given in A225953.

Examples

			a(1) = 1 because D(1) = A079896(1) = 5 and f(1) = 3; both are odd, therefore a(1) = 3 - 2 = 1.
a(2) = 2 from D(2) = 8, f(2) = 3, a(2) = f(2) - 1 = 2.
The quadratic irrational (principal root) of the principal form of discriminant D(5) = 17 which is F_p(17) = [1, 3, -2], is omega_p(17) = (-3 + sqrt(17))/2 approximately 0.561552813.
  f(17) = 5, a(5) = 5 - 2 = 3 = b(17).
		

References

  • D. A. Buell, Binary Quadratic Forms, Springer, 1989.
  • A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, Sammlung Goeschen Band 5131, Walter de Gruyter, 1973.

Crossrefs

Programs

  • SageMath
    def a(n):
        i, D = 1, Integer(5)
        while(i < n):
            D += 1; i += 1*(((D%4) in [0, 1]) and (not D.is_square()))
        return ceil(sqrt(D))-1-1*(D%2==ceil(sqrt(D))%2)  # Robin Visser, Jun 07 2025

Formula

Define D(n) := A079896(n) and f(n) = ceiling(sqrt(D(n))).
a(n) = f(n) - 2 if D(n) and f(n) have the same parity, and a(n) = f(n) - 1 if D(n) and f(n) have opposite parity.

Extensions

Offset corrected by Robin Visser, Jun 07 2025