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.

Showing 1-2 of 2 results.

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

A306638 a(n) is the norm of the fundamental unit of binary quadratic forms with discriminant D = A079896(n).

Original entry on oeis.org

-1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, -1, -1
Offset: 1

Views

Author

Jianing Song, Mar 02 2019

Keywords

Comments

The fundamental unit of binary quadratic forms with discriminant D is the number (x_1 + (y_1)*sqrt(D))/2, where (x_1,y_1) is the smallest solution to x^2 - D*y^2 = +-4. Each term is either -1 or 1 depending on whether (x_1)^2 - D*(y_1)^2 = -4 or 4.
All solutions to x^2 - D*y^2 = +-4 are given by the identity (x_n + (y_n)*sqrt(D))/2 = ((x_1 + (y_1)*sqrt(D))/2)^n.
The discriminants D corresponding to (x_1)^2 - D*(y_1)^2 = -4 are listed in A226696.

Examples

			Fundamental units and their norms for the first 15 discriminants in the form (X + Y*sqrt(D))/2 (N = (X^2 - D*Y^2)/4 are the corresponding norms) are:
   D |  X |  Y |  N
   5 |  1 |  1 | -1
   8 |  2 |  1 | -1
  12 |  4 |  1 |  1
  13 |  3 |  1 | -1
  17 |  8 |  2 | -1
  20 |  4 |  1 | -1
  21 |  5 |  1 |  1
  24 | 10 |  2 |  1
  28 | 16 |  3 |  1
  29 |  5 |  1 | -1
  32 |  6 |  1 |  1
  33 | 46 |  8 |  1
  37 | 12 |  2 | -1
  40 |  6 |  1 | -1
  41 | 64 | 10 | -1
		

References

  • D. A. Buell, Binary Quadratic Forms, Springer, 1989, Sections 3.2 and 3.3, pp. 31-48.

Crossrefs

A014077 is a subsequence listing the corresponding values for only fundamental discriminants (A003658).

Programs

  • Julia
    using Nemo
    function b(D)
        for j in 1:10000
            issquare(D*j^2 - 4) && return -1
            issquare(D*j^2 + 4) && return 1
        end
    0 end
    F = findall(n -> ZZ(n) % 4 <= 1 && !issquare(ZZ(n)), 1:100)
    map(n -> b(ZZ(n)), F) |> println # Peter Luschny, Mar 08 2019
  • PARI
    b(D) = for(n=1, oo, if(issquare(D*n^2-4), return(-1)); if(issquare(D*n^2+4), return(1)))
    for(n=2, 200, if(n%4 <= 1 && !issquare(n), print1(b(n), ", ")))
    

Formula

a(n) = -1 if D = A079896(n) is in A226696, otherwise 1.

Extensions

Offset changed to 1 by Robin Visser, Jun 09 2025
Showing 1-2 of 2 results.