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.

Previous Showing 11-14 of 14 results.

A317989 Number of genera of real quadratic field with discriminant A003658(n), n >= 2.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 4, 1, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 1, 2, 4, 1, 1, 4, 2, 2, 2, 2, 1, 4, 2, 2, 1, 2, 4, 1, 2, 4, 4, 2, 1, 2, 1, 2, 2, 2, 1, 1, 2, 4, 2, 2, 2, 2, 4, 2, 1, 2, 1, 2, 2, 1, 2, 2, 2, 1, 4, 2, 2, 1, 4, 1, 4, 1, 2
Offset: 2

Views

Author

Jianing Song, Oct 03 2018

Keywords

Comments

The number of genera of a quadratic field is equal to the number of elements x in the class group such that x^2 = e where e is the identity.
This is the analog of A003640 for real quadratic fields. Note that for this case "the class group" refers to the narrow class group, or the form class group of indefinite binary quadratic forms with discriminant k.

Crossrefs

Programs

  • Mathematica
    2^(PrimeNu[Select[Range[2, 300], NumberFieldDiscriminant[Sqrt[#]]==#&]] - 1) (* Jean-François Alcover, Jul 25 2019 *)
  • PARI
    for(n=2, 1000, if(isfundamental(n), print1(2^(omega(n) - 1), ", ")))
    
  • PARI
    for(n=2, 1000, if(isfundamental(n), print1(2^#select(t->t%2==0, quadclassunit(n).cyc), ", ")))
    
  • Sage
    def A317989_list(len):
        L = (sloane.A001221(n) for n in (1..len) if is_fundamental_discriminant(n))
        return [2^(l-1) for l in L]
    A317989_list(290) # Peter Luschny, Oct 15 2018

Formula

a(n) = 2^(omega(A003658(n)-1)) = 2^A317991(n), where omega(k) is the number of distinct prime divisors of k.

Extensions

Offset corrected by Jianing Song, Mar 31 2019

A006375 Number of equivalence classes of cycles (or periods) of reduced indefinite binary quadratic forms of determinant -n (see comments).

Original entry on oeis.org

2, 1, 1, 3, 2, 1, 1, 2, 4, 2, 1, 2, 2, 1, 2, 5, 2, 2, 1, 3, 2, 1, 1, 3, 6, 2, 2, 2, 2, 2, 1, 3, 2, 2, 2, 7, 3, 1, 2, 4, 2, 2, 1, 2, 4, 1, 1, 4, 6, 3, 2, 3, 2, 2, 2, 3, 2, 2, 1, 4, 2, 1, 3, 8, 4, 2, 1, 3, 2, 2, 1, 5, 2, 2, 3, 2, 2, 2, 2, 5, 8, 3, 1, 4, 4, 1, 2, 3, 2, 4, 2, 2, 2, 1, 2, 5
Offset: 1

Views

Author

Keywords

Comments

From Robin Visser, Jun 05 2025: (Start)
Let a (classically integral) binary quadratic form f(x,y) = a*x^2 + 2*b*x*y + c*y^2 of determinant -n = a*c-b^2 (or equivalently, of discriminant 4*n = 4*(b^2 - a*c)) be denoted as the triple [a,b,c]. If n is not a square, then we can define a sequence of binary quadratic forms [a_0, b_0, c_0], [a_1, b_1, c_1], [a_2, b_2, c_2], ... by the following recursive definition: Let [a_0, b_0, c_0] = [a, b, c], and for each i >= 0, let [a_{i+1}, b_{i+1}, c_{i+1}] = [c_i, t, (t^2 - n)/c_i] where t is the largest integer such that t = -b_i (mod c_i) and t^2 < n, if such an integer t exists. Otherwise t is the smallest integer (in absolute value) which satisfies t = -b_i (mod c_i), taking t positive in the case of a tie (see Conway--Sloane pg 357).
Gauss showed that such sequences are eventually periodic, and we denote the cycle of f(x,y) as the set of all forms in the period of this sequence (see also A087048 for a similar definition of cycle). If n is a square, then this sequence terminates in a form [a_k, b_k, 0], and the definition must be modified slightly (see Conway--Sloane pg 359). Two binary quadratic forms f(x,y) and g(x,y) are said to be properly equivalent if they have the same cycle.
This sequence a(n) counts equivalence classes of such cycles of indefinite binary quadratic forms f(x,y) of determinant -n, with respect to a somewhat coarser notion of equivalence than proper equivalence; here the binary forms [a, b, c], [-a, b, -c], [c, b, a], and [-c, b, -a] are all counted as part of the same equivalence class. (End)

Examples

			From _Robin Visser_, Jun 08 2025: (Start)
For n = 1, every indefinite binary quadratic form of determinant -1 (equivalently discriminant 4) is equivalent to either 2*x*y - y^2 or 2*x*y, thus a(1) = 2.
For n = 2, every indefinite binary quadratic form of determinant -2 (equivalently discriminant 8) is equivalent to x^2 + 2*x*y - y^2, thus a(2) = 1.
For n = 3, every indefinite binary quadratic form of determinant -3 (equivalently discriminant 12) is equivalent to x^2 + 2*x*y - 2*y^2, thus a(3) = 1.
For n = 4, every indefinite binary quadratic form of determinant -4 (equivalently discriminant 16) is equivalent to either x^2 + 2*x*y - 3*y^2, 4*x*y - 2*y^2, or 4*x*y, thus a(4) = 3. (End)
		

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 362.
  • C. F. Gauss, Disquisitiones arithmeticae, Yale University Press, New Haven, Conn.-London, 1966.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • SageMath
    def a(n):
        S = []
        for b in range(1, ceil(sqrt(n))):
            for a in Integer(n-b^2).divisors():
                c = (b^2-n)/a
                F = [BinaryQF(x,2*b,y) for (x,y) in [(a,c),(-a,-c),(c,a),(-c,-a)]]
                if all([(not Q.is_equivalent(t)) for t in S for Q in F]): S.append(F[0])
        if Integer(n).is_square():
            for c in range(-sqrt(n), sqrt(n)+1):
                F = [BinaryQF(x,2*sqrt(n),y) for (x,y) in [(0,c),(0,-c),(c,0),(-c,0)]]
                if all([(not Q.is_equivalent(t)) for t in S for Q in F]): S.append(F[0])
        return len(S)  # Robin Visser, Jun 06 2025

Extensions

Corrected Apr 15 1995
Name clarified by Robin Visser, May 30 2025
Term a(65) corrected and more terms from Robin Visser, Jun 06 2025

A257006 Irregular triangle read by rows: period lengths of periods of primitive Zagier-reduced binary quadratic forms with discriminants D(n) = A079896(n).

Original entry on oeis.org

1, 2, 2, 1, 3, 5, 4, 3, 1, 4, 2, 5, 2, 5, 4, 1, 6, 4, 7, 6, 4, 11, 6, 3, 5, 1, 6, 2, 10, 7, 8, 2, 9, 7, 6, 3, 2, 1, 11, 9, 7, 8, 8, 2, 8, 4, 21, 10, 7, 7, 1, 8, 2, 10, 4, 9, 5, 12, 6
Offset: 1

Views

Author

Barry R. Smith, Apr 20 2015

Keywords

Comments

The possible positive nonsquare discriminants of binary quadratic forms are given in A079896.
For the definition of Zagier-reduced binary quadratic forms, see A257003.
A form is primitive if its coefficients are relatively prime.
The row sums give A257004(n), the number of primitive Zagier-reduced forms of discriminant D(n).
The number of entries in row n is A087048(n), the class number of primitive forms of discriminant D(n).

Examples

			The table a(n,k) begins:
n/k  1   2   ...   D(n)    A087048(n)   A257004(n)
1:   1               5        1             1
2:   2               8        1             2
3:   2   1          12        2             3
4:   3              13        1             3
5:   5              17        1             5
6:   4              20        1             4
7:   3   1          21        2             4
8:   4   2          24        2             6
9:   5   2          28        2             7
10:  5              29        1             5
11:  4   1          32        2             5
12:  6   4          33        2            10
13:  7              37        1             7
14:  6   4          40        2            10
15: 11              41        1            11
16:  6   3          44        2             9
17:  5   1          45        2             6
18:  6   2          48        2             8
19: 10              52        1            10
		

References

  • D. B. Zagier, Zetafunktionen und quadratische Körper, Springer, 1981.

Crossrefs

Formula

a(n,k), n >= 1, k = 1, 2, ..., A079896(n), is the length of the k-th period of the primitive Zagier-reduced forms of discriminant D(n) = A079896(n). The lengths in row n are organized in nonincreasing order.

Extensions

Offset corrected by Robin Visser, Jun 08 2025

A261249 Number of classes of proper solutions of the Pell equation x^2 - D(n) y^2 = +4 for D(n) = A079896(n), n >= 1.

Original entry on oeis.org

2, 0, 1, 2, 0, 0, 2, 0, 1, 2, 1, 0, 0, 0, 0, 1, 2, 0, 0, 2, 0, 0, 1, 2, 0, 0, 2, 0, 0, 1, 2, 0, 0, 2, 0, 0, 1, 2, 1, 0, 0, 0, 0, 1, 2, 0, 0, 0, 2, 0, 1, 2, 1, 0, 0, 2, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Wolfdieter Lang, Sep 16 2015

Keywords

Comments

See the W. Lang link on A225953, Table 2. References will also be found there. For the present class number see especially Theorem 109 pp. 207-208 of the Nagell reference.
These class numbers should not be confused with the class numbers of indefinite binary quadratic forms of discriminant D(n), which are given in A087048(n).
If a(n) = 2 then the proper positive fundamental solution for the second class [x2(n), y2(n)] is obtained from the solution of the first class [x1(n), y1(n)] (shown in the mentioned Table 2 under Pell(X, Y)) by application of the matrix M(n) = [[x0(n), D(n)*y0(n)], [y0(n), x0(n)]] on (x1(n), -y1(n))^T (T for transposed), where x0(n) and y0(n) is the positive (proper) fundamental solution of x^2 - D(n)*y^2 = +1 found under A033313 and A033317 for the appropriate D from A000037. Application of positive powers of M(n) to the proper positive fundamental solution of each class produces all positive solutions.
If a(n) = 1 the class is called ambiguous (see Nagell, p. 205). In this case the proper positive fundamental solution [x1(n), y1(n)] = [x(n), y(n)] and the negative one [x1(n), -y1(n)] belong to the same class.
For every D(n) = A079896(n) there is the improper positive fundamental solution [2*x0(n), 2*y0(n)].
Conjecture: For even D(n), i.e., D from 4*A000037, and a(n) = 0 one finds for r(n) = D(n)/4 coincidence with Conway's so-called rectangular numbers A007969. The first D values are 8, 20, 24, 40, 48, 52, 56, 68, 72, 80, ... This is equivalent to the conjecture that X^2 - r*y^2 = +1 has an even fundamental positive solution y = y0 precisely for the numbers A007969 (because x has to be even, x = 2*X, and whenever y0 is even all y solutions are even). See A261250 and A262024 for the y0 and x0 values, respectively.

Examples

			n=1: D(1) = 5 = A000037(3) with the a(1) = 2 proper positive fundamental solutions [x, y] = [3, 1] and [7, 3] for the two classes.
  [x0(1), y0(1)] = [A033313(3), A033317(3)] = [9, 4], and (7, 3)^T = [[9, 4*5], [4, 9]] (3, -1)^T.
  All other positive solutions in each of the two classes are obtained by applying positive powers of this matrix M(5) to the fundamental solutions.
  The improper positive fundamental solution is [2*9, 2*4] = [18, 8].
n=2: D(2) = 8 = A000037(6) has a(2) = 0, hence there are only the improper solutions obtainable from [2*3, 2*1] = [6, 2], the smallest positive one. For this even D one has, with x = 2*X, X^2 - 8/4 y^2 = +1, which has an even positive fundamental solution y0 = 2, and r(2) = D(2)/4 = 2 is A007969(1).
		

References

  • Nagell, T. Introduction to number theory, Chelsea Publishing Company, 1964, page 52.

Crossrefs

Extensions

Offset corrected by Robin Visser, Jun 08 2025
Previous Showing 11-14 of 14 results.