cp's OEIS Frontend

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.

Showing 1-3 of 3 results.

A257007 Number of Zagier-reduced binary quadratic forms of discriminant n^2-4.

Original entry on oeis.org

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, 76, 39, 62, 56, 92, 42, 72, 42, 120, 68, 72, 70, 136, 46, 126, 76, 112, 100, 96, 68, 146, 105, 125, 66, 226, 77, 168, 96, 138, 126, 160, 96, 228, 100, 142
Offset: 1

Views

Author

Barry R. Smith, Apr 16 2015

Keywords

Comments

The number of finite sequences of positive integers with odd length parity and alternant equal to n.
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.
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)

Examples

			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.
		

References

  • D. B. Zagier, Zetafunktionen und quadratische Korper, Springer, 1981.

Crossrefs

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

Programs

  • Maple
    # 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
    with(numtheory); # return number of divisors of m less than b
    dbm:=proc(b,m) local i,t1,t2;
    t1:=divisors(m); t2:=0;
    for i from 1 to nops(t1) do if t1[i]add(dbm(b,b*n-b^2-1), b=1..n-1);
    [seq(f(n),n=1..100)];
  • Mathematica
    Table[Length[
      Flatten[
       Select[
        Table[{a, k}, {k,
          Select[Range[Ceiling[-Sqrt[n]], Floor[Sqrt[n]]],
           Mod[# - n, 2] == 0 &]}, {a,
          Select[Divisors[(n - k^2)/4], # > (Sqrt[n] - k)/2 &]}],
        UnsameQ[#, {}] &], 1]], {n, Map[#^2 - 4 &, Range[3, 60]]}]
  • PARI
    d(n, k) = #select(x->(xMichel Marcus, Apr 18 2023; based on Technau Lemma 3

Formula

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.
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

A264597 Triangle T(n,m) (n >= 2, 0 <= m <= n-1) read by rows, defined in Comments.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 4, 2, 1, 1, 7, 3, 2, 1, 1, 7, 3, 1, 1, 1, 1, 12, 4, 3, 2, 1, 1, 1, 8, 2, 1, 1, 1, 1, 1, 1, 20, 8, 4, 2, 2, 1, 1, 1, 1, 13, 3, 2, 2, 1, 1, 1, 1, 1, 1, 18, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1, 18, 6, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 31, 8, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 20, 6, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 31, 8, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 24, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 39, 10, 6, 4, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 2

Author

N. J. A. Sloane, Nov 19 2015

Keywords

Comments

We work with 2 X 2 matrices X = [a,b; c,d] with integer entries. Let M be the free monoid generated by L = [1,0; 1,1] and R = [1,1; 0,1]. Let t be the map [a,b; c,d] -> (a+b)/(c+d). Then T(n,m) is the number of X in M with trace(X)=n and m <= t(X) < m+1.

Examples

			Triangle begins:
   1,
   1, 1,
   3, 2, 1,
   4, 2, 1, 1,
   7, 3, 2, 1, 1,
   7, 3, 1, 1, 1, 1,
  12, 4, 3, 2, 1, 1, 1,
   8, 2, 1, 1, 1, 1, 1, 1,
  20, 8, 4, 2, 2, 1, 1, 1, 1,
  13, 3, 2, 2, 1, 1, 1, 1, 1, 1,
  18, 4, 3, 2, 2, 2, 1, 1, 1, 1, 1,
  18, 6, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
  31, 8, 6, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1,
  20, 6, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  ...
		

Crossrefs

Row sums are A264598. It appears that the row sums are also twice A257007.

A264599 Partial sums of A257007.

Original entry on oeis.org

0, 0, 1, 4, 8, 15, 22, 34, 42, 62, 75, 93, 111, 142, 162, 193, 217, 256, 282, 335, 355, 421, 457, 493, 543, 619, 658, 720, 776, 868, 910, 982, 1024, 1144, 1212, 1284, 1354, 1490, 1536, 1662, 1738, 1850, 1950, 2046, 2114, 2260, 2365, 2490, 2556, 2782, 2859, 3027, 3123, 3261, 3387, 3547, 3643
Offset: 1

Author

N. J. A. Sloane, Nov 19 2015

Keywords

Crossrefs

Showing 1-3 of 3 results.