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.
%I A257007 #39 Apr 18 2023 05:27:27 %S A257007 0,0,1,3,4,7,7,12,8,20,13,18,18,31,20,31,24,39,26,53,20,66,36,36,50, %T A257007 76,39,62,56,92,42,72,42,120,68,72,70,136,46,126,76,112,100,96,68,146, %U A257007 105,125,66,226,77,168,96,138,126,160,96,228,100,142 %N A257007 Number of Zagier-reduced binary quadratic forms of discriminant n^2-4. %C A257007 The number of finite sequences of positive integers with odd length parity and alternant equal to n. %C A257007 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. %C A257007 The number of possible asymmetry types for the quotient sequence of the even-length continued fraction expansion of a rational number a/b, where b satisfies one of the congruences b^2 + nb + 1 = 0 (mod a) or b^2 - nb + 1 = 0 (mod a) %D A257007 D. B. Zagier, Zetafunktionen und quadratische Korper, Springer, 1981. %H A257007 P. Kleban and A. Özlük, <a href="http://arxiv.org/abs/cond-mat/9808182">A Farey fraction spin chain</a>, arXiv:cond-mat/9808182 [cond-mat.stat-mech], 1998; Communications in mathematical physics, 203(3):635-647, 1999. This sequence appears to be the function Phi(n) given in Theorem 4. %H A257007 B. R. Smith, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Smith/smith5.html">Reducing quadratic forms by kneading sequences</a> J. Int. Seq., 17 (2014) 14.11.8. %H A257007 B. R. Smith, <a href="https://doi.org/10.4064/aa167-2-5">End-symmetric continued fractions and quadratic congruences</a>, Acta Arith., 167 (2015) 173-187. %H A257007 Marc Technau, <a href="https://web.archive.org/web/20171109080920/http://www.mathematik.uni-wuerzburg.de/~steuding/technau.pdf">The Calkin-Wilf tree and a trace condition</a>, Master's Thesis, 2015. The sequence appears to be the function N(n,0) from subsection 1.3.1. %H A257007 Marc Technau, <a href="https://arxiv.org/abs/2304.08143">Remark on the Farey fraction spin chain</a>, arXiv:2304.08143 [math.NT], 2023. See Theorem 2 p. 4. %F A257007 With D=n^2-4, 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. %F A257007 From the Kleban et al. reference it appears that a(n) = Sum_{b=1..n-1} dbm(b,n*b-b^2-1), where dbm(b,m) = number of positive divisors of m that are less than b. - _N. J. A. Sloane_, Nov 19 2015 %e A257007 For n=5, the a(5) = 4 Zagier-reduced forms of discriminant 21 are x^2 + 5*x*y + y^2, 5*x^2 + 9*x*y + 3*y^2, 3*x^2 + 9*x*y + 5*y^2, and 5*x^2 + 11*x*y + 5*y^2. %p A257007 # Maple code for the formula given by Kleban et al., which is almost certainly the same sequence as this (but until that is proved, the program should not be used to extend this sequence, A264598 or A264599). - _N. J. A. Sloane_, Nov 19 2015 %p A257007 with(numtheory); # return number of divisors of m less than b %p A257007 dbm:=proc(b,m) local i,t1,t2; %p A257007 t1:=divisors(m); t2:=0; %p A257007 for i from 1 to nops(t1) do if t1[i]<b then t2:=t2+1; fi; od; %p A257007 t2; end; %p A257007 f:=n->add(dbm(b,b*n-b^2-1), b=1..n-1); %p A257007 [seq(f(n),n=1..100)]; %t A257007 Table[Length[ %t A257007 Flatten[ %t A257007 Select[ %t A257007 Table[{a, k}, {k, %t A257007 Select[Range[Ceiling[-Sqrt[n]], Floor[Sqrt[n]]], %t A257007 Mod[# - n, 2] == 0 &]}, {a, %t A257007 Select[Divisors[(n - k^2)/4], # > (Sqrt[n] - k)/2 &]}], %t A257007 UnsameQ[#, {}] &], 1]], {n, Map[#^2 - 4 &, Range[3, 60]]}] %o A257007 (PARI) d(n, k) = #select(x->(x<n), divisors(k)); %o A257007 a(n) = if (n<=2, 0, sum(i=1, n-1, d(i, i*n-i^2-1))); \\ _Michel Marcus_, Apr 18 2023; based on Technau Lemma 3 %Y A257007 Cf. A257003, A257008, A257009. %Y A257007 It appears that this sequence gives half the row sums of the triangle in A264597 (cf. A264598), and also the first column of A264597. - _N. J. A. Sloane_, Nov 19 2015 %K A257007 nonn %O A257007 1,4 %A A257007 _Barry R. Smith_, Apr 16 2015