A226164 Sequence used for the quadratic irrational number belonging to the principal indefinite binary quadratic form.
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
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.
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())) 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
Comments