OFFSET

0,5

COMMENTS

The principal indefinite binary quadratic form F_p of discriminant D is [1, b(D), c(D)] with c(D) = -(D - b(D)^2)/4 and, using f(D) := ceiling(sqrt(D)), b(D) = f(D) - 2 if D and f(D) have the same parity, and b(D) = f(D) - 1 if D and f(D) have opposite parity. For the possible D values see A079896.

For example, D = 5, f(D) = 3, F_p(5) = [1, 1, -1]; D = 28, f(D) = 6, [1, 4, -3]; D = 20, f(D) = 5, [1, 4, -1]; D = 13, f(D) = 4, [1, 3 ,-1]. For the definition of the principal form see the Buell reference, p. 26. The period (called cycle by Buell) starting with this principal form (which is reduced) is the principal period, and the length of this period is 2*a(n) for D = D(n) = A079896(n). For all periods for D(n), n=0, ..., 99, see a link under A225953.

The quadratic irrational number belonging to the principal indefinite form F_p = [1, b(D), c(D)] from above is defined as omega_p(D) := (-b(D) + sqrt(D))/2 (see the general definition by Buell on p.31). This is a solution of x^2 + b(D)*x + c(D) = 0. This irrational omega_p(D) has a periodic regular continued fraction (r.c.f) with primitive period length a(n) if the form [-1, b(D), -c(D)] appears in the principal period. Otherwise the primitive period length of this r.c.f. is 2*a(n).

For the connection between the principal period (or cycle) of indefinite forms of discriminant D and the continued fraction expansion of omega_p(D) see the Buell reference, ch. 3.

The irrational omega_p(D(n)) is from the interval (0, 1/2) if

D and f(D) = ceiling(sqrt(D)) are of opposite parity, and from (1/2, 1) if they are of the same parity.

The irrational omega_p(D(n)) is an integer in the real quadratic field Q(sqrt(m(n))) with m(n) := squarefree part of D(n).

REFERENCES

D. A. Buell, Binary Quadratic Forms, Springer, 1989.

FORMULA

a(n) is one half of the (primitive) period length of the principal period of indefinite forms of discriminant D(n) = A079896(n), n >= 0.

a(n) is the (primitive) period length of the regular continued fraction (r.c.f.) of the quadratic irrational omega_p(D(n)) defined above for discriminant D(n) = A079896(n), n >= 0, if the form [-1, b(D), -c(D)] appears in the principal period. See the comment section for b(D) and c(D). Otherwise this r.c.f. has period length 2*a(n).

EXAMPLE

a(0) = 1 because for D(1) = 5 the principal period is [[1, 1, -1], [-1, 1, 1]], and its length is 2.

a(0) = 1 because D(1) = 5, f(5) = 3, m(0)= 5, omega_p(5) = (-1 + sqrt(5))/2 = -1*1 + 1*eta(5), with eta(5) := (1 + sqrt(5))/2 (golden section), in the basis <1, eta(5)> for integers of Q(sqrt(5)) = Q(eta(5)). The regular continued fraction (r.c.f) is omega_p(5) = [0, period(1)], with period length 1 = a(0).

a(2) = 1 because for D(2) = 12 the principal period is [[1, 2, -2], [-2, 2, 1]], and its length is 2.

a(2) = 1 because D(2) = 12, f(12) = 4, m(2)= 3, omega_p(12) = -1 + sqrt(3), an integer of Q(sqrt(3)). Its regular continued fraction is [0, period(1,2)], with period length 2 = 2*a(2) because [-1, 2, 2] is not an element of the principal period.

a(4) = 3 from D(4) = 17, f(17) = 5, m(4)= 17, omega_p(17) = (-3 + sqrt(17))/2 = -2*1 + 1*eta(17), with eta(17) :=(1+sqrt(17))/2. This is an integer in Q(sqrt(17)), and the r.c.f. is omega_p(17) = [0,period(1,1,3)] with period length 3 = a(4).

a(5) = 1 from D(5) = 20, f(20) = 5, m(5) = 5, omega_p(20) = (-4 + sqrt(20))/2 = -3*1 + 2*eta(5) (see the example a(0)). The r.c.f. is [0,period(4)] with period length 1 = a(5).

The principal period (cycle) for D = 20 is [[1, 4, -1], [-1, 4, 1]] (the only period, see a link under A225953). The length of the period is 2 = 2*a(5).

CROSSREFS

KEYWORD

nonn

AUTHOR

Wolfdieter Lang, Jun 16 2013

EXTENSIONS

Name changed and errors corrected by Wolfdieter Lang, Jun 16 2013

STATUS

approved