A226166 One half of the length of the period of the principal indefinite quadratic binary form of discriminant D(n) = A079896(n).
1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 2, 3, 1, 5, 1, 1, 1, 5, 1, 2, 3, 1, 3, 3, 1, 2, 1, 9, 3, 1, 1, 3, 1, 3, 7, 2, 1, 1, 9, 3, 1, 3, 1, 7, 2, 7, 5, 1, 1, 4, 1, 2, 5, 2, 2, 2, 7, 1, 2, 3, 1, 5, 1, 4, 1, 5, 1, 5, 3, 1, 1, 5, 1, 4, 6, 3, 5, 6, 3, 2, 2, 1, 15, 3, 1, 7, 1, 2, 3, 6, 5, 2, 3, 8, 2, 1, 1
Offset: 1
Keywords
Examples
a(1) = 1 because for D(1) = 5 the principal period is [[1, 1, -1], [-1, 1, 1]], and its length is 2. a(1) = 1 because D(1) = 5, f(5) = 3, m(1)= 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(1). a(3) = 1 because for D(3) = 12 the principal period is [[1, 2, -2], [-2, 2, 1]], and its length is 2. a(3) = 1 because D(3) = 12, f(12) = 4, m(3)= 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(3) because [-1, 2, 2] is not an element of the principal period. a(5) = 3 from D(5) = 17, f(17) = 5, m(5)= 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(5). a(6) = 1 from D(6) = 20, f(20) = 5, m(6) = 5, omega_p(20) = (-4 + sqrt(20))/2 = -3*1 + 2*eta(5) (see the example a(1)). The r.c.f. is [0,period(4)] with period length 1 = a(6). 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(6).
References
- D. A. Buell, Binary Quadratic Forms, Springer, 1989.
Links
- Robin Visser, Table of n, a(n) for n = 1..10000
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())) Q = BinaryQF.principal(D).reduced_form() return len(Q.cycle(proper=True))/2 # Robin Visser, Jun 01 2025
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 >= 1.
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 >= 1, 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).
Extensions
Name changed and errors corrected by Wolfdieter Lang, Jun 16 2013
Offset corrected by Robin Visser, Jun 01 2025
Comments