OFFSET
3,1
COMMENTS
The alternant of a sequence of positive integers (c_1, ..., c_r) with r>=3 is the positive integer [c_1, ..., c_r] - [c_2, ..., c_{r-1}], in which an expression in brackets denotes the numerator of the simplified rational number with continued fraction expansion having the sequence of quotients in brackets. The alternant of (c_1) is c_1 and the alternant of (c_1, c_2) is c_1*c_2. There are finitely many sequences with given alternant >= 3. (There are infinitely many sequences with alternant 2 -- (2), (1,2), (2,1), and all sequences of the form (1,p,1). It is for this reason that the offset is 3.)
The number of Zagier-reduced binary quadratic forms with discriminant equal to n^2-4 or n^2+4
The number of pairs of integers (h,k) with |k| < sqrt(D), k^2 congruent to D (mod 4), h > (sqrt(D) - k)/2, h exactly dividing (D-k^2)/4, where D=n^2+4 or n^2-4.
REFERENCES
D. B. Zagier, Zetafunktionen und quadratische Korper, Springer, 1981.
LINKS
B. R. Smith, Reducing quadratic forms by kneading sequences J. Int. Seq., 17 (2014) 14.11.8.
FORMULA
a(n) equals the number of pairs (h,k) with |k| < sqrt(D), k^2 congruent to D (mod 4), h > (sqrt(D) - k)/2, h exactly dividing (D-k^2)/4, where D = n^2-4 or n^2+4.
CROSSREFS
KEYWORD
nonn
AUTHOR
Barry R. Smith, Apr 16 2015
STATUS
approved