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-5 of 5 results.

A307236 One half of the number of primitive reduced binary quadratic forms for discriminant 4*A000037(n), for n >= 1.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Mar 30 2019

Keywords

Comments

This is a subset of one half of A082174. See the formula.
This sequence is also one half of the total length of the A307359(n) cycles for discriminant 4*D(n), with D(n) = A000037(n). See the W. Lang link in A324251, Table 2, last column SigmaL(n) = 2*a(n). - Wolfdieter Lang, Apr 19 2019

Examples

			a(5) = 4 because the fifth even term of A079896 is at position e(5) = 8, and A082174(8)/2 = 4.
The 2*a(5) = 8 primitive reduced forms for discriminant 4*A000037(5) = 4*7 = 28 are [[-2, 2, 3], [2, 2, -3], [-3, 2, 2], [3, 2, -2], [-1, 4, 3], [1, 4, -3], [-3, 4, 1], [3, 4, -1]].
The preceding 8 forms give the 2 = A307359(5) 4-cycles CR(5) = [[1, 4, -3], [-3, 2, 2], [2, 2, -3], [-3, 4, 1]], the principal cycle with the principal reduced form [1, 4, -3], and the 4-cycle obtained from this by a sign flip of the outer form entries. - _Wolfdieter Lang_, Apr 19 2019
		

Crossrefs

Formula

a(n) = A082174(e(n))/2, with e(n) the position of the n-th even term of A079896.

A378710 Positive numbers k such that -k is properly represented by the Pell Form x^2 - 15*y^2.

Original entry on oeis.org

6, 11, 14, 15, 35, 51, 59, 71, 86, 110, 119, 131, 134, 159, 179, 191, 206, 215, 231, 239, 251, 254, 294, 311, 326, 335, 339, 359, 366, 371, 374, 411, 419, 431, 446, 479, 491, 519, 515, 519, 539, 566, 590, 591, 599, 614, 635, 654, 659, 671, 686
Offset: 1

Views

Author

Wolfdieter Lang, Dec 13 2024

Keywords

Comments

This is a subsequence of A237606. There the uninteresting numbers that have improper representations are also recorded.
The primes in the sequence are given in A141302.
A primitive indefinite form F(a,b,c;x,y) = a*x^2 + b*x*y + c*y^2, or [a, b, c] with gcd(a, b, c) = 1 and even discriminant Disc = b^2 - 4*a*c = 60 = 4*D, D = 15, has class number A307359(12) = 4. The four reduced 2-cycle forms are the principal cycle CR = {[1, 6, -6], [6, 6,-1]}, CRhat = {[-1, 6, 6], [-6, 6,1]}, (outer signs flipped), Cy ={[2, 6, -3], [-3, 6, 2]} and Cyhat ={[-2, 6, 3], [3, 6, -2]}.
A proper representation of an integer k (not 0) by such a form F is determined by the rpapfs (representative parallel primitive forms) FPa(k, j) = [k, 2*j, (j^2 - 15)/k], where j from {0, 1, ...,|k|-1} is determined by the congruence j^2 - 15 = = 0 (mod |k|).
The equivalence transformations R(t) of a form F = [a, b, c] is [c , -b +2*c*t, 1 - b*t + c*t^2]. This corresponds to R(t) = Matrix([0, -1], [1, t]). Half-reduced R-transformations use the choice t = ceiling((8 + b)/(2*c) - 1), if c > 0, and t = floor(1 - (8 + b)/(2*|c|)) if c < 0. (c = 0 is not considered because Disc becomes a square).
Because any form F of Disc = 60 represents a negative integer -k if it is equivalent to one of the rpapfs FPa(-k, j), the allowed values are
k = 2^{e_2}*3^{e_3}*5^{e_5}*Product_{i=1..P} p_i^{e_j}, where p_i is an odd prime >= 7 from the sequence A097956 or A038887(n), n >= 4, the p with Legendre(15, p) = +1. The exponents for 2, 3, and 5 are from {0, 1} (these primes are not liftable to powers) and e_i >= 0 (p_i is uniquely liftable to powers, see the Apostol reference), but not all exponents should be 0, because -1 is not represented. The number of infinite families of proper solutions (x, y), with positive values y, is 2^(P).
The present sequence is a proper subset of these generally allowed k values. One has to check if the rpapfs Fpa(-k, j) reach the principal cycle CR, then if so k is a member of the present sequence. This is because the Pell form FPell = [1, 0, -15] reaches (taking t to be first 0 then 3) the cycle member CR(1) = [1, 6, -6], the reduced principal form.
For details see the W. Lang paper in the links.
For the fundamental proper positive solutions of the infinite families for - a(n) see A378711. Note that -a(n) may also have improper solutions besides the proper ones whenever even powers of primes satisfying Legendre(15, p) = +1 appear, e.g., the first instance being -294 = -2*3*7^2).

Examples

			-2, -3, and -5 are not in the sequence because the rpapfs are [-2, 2, 7] reaching after two R(t)-steps with t values -0 and  -1 the cycle member Cyhat(1), [-3, 0, 5] reaching with t values 0  and 1 Cy(1), and [-5, 0, 3] reaches with t = 0 Cyhat(2), respectively.
-a(1) = -6 = -2*3 is represented because [-6, 6, 1] = CR(2) (already a reduced form). There is only one infinite family of proper solutions with y > 0 (an ambiguous case) with fundamental solution (x, y) = (3, 1).
There is no solution representing  -10 = -2*5, because [-10, 10, -1] leads with t = -8 to CRhat(1).
-a(11) = - 119 has the four rpapfs [-119, 54, -6], [-119, 82, -14], [-119, 156, -51], and [-119, 184, -71]. They lead with t = -5,  t = -3, 4, t = -1, 2, 2, and t = -1, 3 to members CR(2), CR(1), CR(1), and CR(2), respectively.
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1986. Theorem 5.10, pp, 121-122.
  • A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989, pp. 21 - 34.
  • Trygve Nagell, Introduction to Number Theory, 2nd edition, Chelsea Publishing Company, 1964, pp. 195 - 212.
  • A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, 5. Aufl., de Gruyter, Berlin, New York, 1973, chapter IV, pp. 97 - 126.

Crossrefs

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

A307377 Array A(n, k) read by upwards antidiagonals giving the number of representative parallel primitive binary quadratic forms for discriminant Disc(n) = 4*D(n), with D(n) = A000037(n), and for representable integer |k| >= 1.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Apr 21 2019

Keywords

Comments

For the definition of representative parallel primitive forms (rpapfs) for discriminant Disc > 0 (the indefinite case) and representation of nonzero integers k see the Scholz-Schoeneberg reference, p. 105, or the Buell reference p. 49 (without use of the name parallel). For the procedure to find the primitive representative parallel forms (rpapfs) for Disc(n) = 4*D(n) = 4*A000037(n) and nonzero integer k see the W. Lang link given in A324251, section 3.
Note that the number of rpapfs of a discriminant Disc > 0 for k >= 1 is identical with the one for negative k. These forms differ in the signs of the a and c entries of these forms but not the b >= 0 entry (called an outer sign flip). See some examples below, and the program in the mentioned W. Lang link, section 3.
For the forms counted in the array A(n, k) see Table 3 of the W. Lang link given in A324251, for n = 1..30 and k = 1..10.
Compare the present array with the ones given in A324252 and A307303 for the number of rpapfs for discriminant 4*D(n) and representable positive and negative k, respectively, that are equivalent (under SL(2, Z)) to the reduced principal form F_p = [1, 2*s(n), -(D(n) - s(n)^2)] with s(n) = A000194(n), of the unreduced Pell form F(n) = [1, 0, -D(n)].
The rpapfs not counted in A324252 and A307303 are equivalent to forms of non-principal cycles for discriminant 4*D(n).
The total number of cycles (the class number h(n)) for discriminant 4*D(n) is given in A307359(n).
The array for the length of the periods of these cycles is given in A307378.
One half of the sum of the length of the periods is given in A307236.

Examples

			The array A(n, k) begins:
n,  D(n) \k  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
-------------------------------------------------------------
1,   2:      1 1 0 0 0 0 2 0 0  0  0  0  0  2  0
2,   3:      1 1 1 0 0 1 0 0 0  0  2  0  2  0  0
3,   5:      1 0 0 2 1 0 0 0 0  0  2  0  0  0  0
4,   6:      1 1 1 0 2 1 0 0 0  2  0  0  0  0  2
5,   7:      1 1 2 0 0 2 1 0 2  0  0  0  0  1  0
6,   8:      1 0 0 1 0 0 2 2 0  0  0  0  0  0  0
7,  10:      1 1 2 0 1 2 0 0 2  1  0  0  2  0  2
8,  11:      1 1 0 0 2 0 2 0 0  2  1  0  0  2  0
9,  12:      1 0 1 1 0 0 0 2 0  0  2  1  2  0  0
10, 13:      1 0 2 2 0 0 0 0 2  0  0  4  1  0  0
11, 14:      1 1 0 0 2 0 1 0 0  2  2  0  2  1  0
12, 15:      1 1 1 0 1 1 2 0 0  1  2  0  0  2  1
13, 17:      1 0 0 0 0 0 0 2 0  0  0  0  2  0  0
14, 18:      1 1 0 0 0 0 2 0 3  0  0  0  0  2  0
15, 19:      1 1 2 0 2 2 0 0 2  2  0  0  0  0  4
16, 20:      1 0 0 1 1 0 0 0 0  0  2  0  0  0  0
17, 21:      1 0 1 2 2 0 1 0 0  0  0  2  0  0  2
18, 22:      1 1 2 0 0 2 2 0 2  0  1  0  2  2  0
19, 23:      1 1 0 0 0 0 2 0 0  0  2  0  2  2  0
20, 24:      1 0 1 1 2 0 0 2 0  0  0  1  0  0  2
...
-------------------------------------------------------------
The antidiagonals:
       1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
1:     1
2:     1 1
3:     1 1 0
4:     1 0 1 0
5:     1 1 0 0 0
6:     1 1 1 2 0 0
7:     1 0 2 0 1 1 2
8:     1 1 0 0 2 0 0 0
9:     1 1 2 1 0 1 0 0 0
10:    1 0 0 0 0 2 0 0 0  0
11:    1 0 1 0 1 0 1 0 0  0  0
12:    1 1 2 1 2 2 2 0 0  0  2  0
13:    1 1 0 2 0 0 0 2 2  2  2  0  0
14:    1 0 1 0 0 0 2 0 0  0  0  0  2  2
15:    1 1 0 0 2 0 0 0 2  0  0  0  0  0  0
16:    1 1 0 0 1 0 0 2 0  1  0  0  0  0  0  0
17:    1 0 2 0 0 1 1 0 0  2  0  0  0  0  0  0  2
18:    1 0 0 0 0 0 2 0 2  0  1  0  0  1  2  0  0  0
19:    1 1 1 1 2 0 0 0 0  0  2  0  2  0  0  0  0  0  0
20:    1 1 2 2 1 2 2 2 0  2  0  1  0  0  0  0  0  0  0  0
...
For this triangle more of the columns of the array have been used than those that are shown.
-----------------------------------------------------------------------------
A(2, 3) = 1 because the representative parallel primitive form (rpapf) for discriminant 4*D(2) = 12 and k = +3 is [3, 0, -1], and the one for k= -3 is [-3, 0, 1] (sign flip in both, the a and c entries, but leaving the b entry).
A(3, 4) = 2 because the two rpapfs for discriminant 4*D(3) = 20 and k = +4 are [4, 2, -1] and [4, 6, 1], and the two ones for k = -4 are [-4, 2, 1], [-4, 6, -1].
		

References

  • D. A. Buell, Binary Quadratic Forms, Springer, 1989, chapter 3, pp. 21 - 43.
  • A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, 5. Aufl., de Gruyter, Berlin, New York, 1973, pp. 112 - 126.

Crossrefs

A307378 Irregular triangle T(n, k) read by rows: row n gives the periods of the cycles of binary quadratic forms of discriminant 4*D(n), with D(n) = A000037(n).

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 4, 4, 2, 2, 2, 6, 2, 2, 2, 2, 10, 4, 4, 2, 2, 2, 2, 2, 2, 2, 6, 6, 2, 2, 6, 6, 6, 6, 4, 4, 2, 2, 4, 4, 2, 6, 2, 2, 4, 4, 10, 2, 2, 4, 4, 8, 8, 4, 4, 4, 4, 4, 4, 6, 6, 2, 2, 2, 2, 2, 6, 6, 2, 2, 2, 2, 6, 6, 2, 2, 4, 4, 6, 2, 2, 2, 2, 10, 10, 8, 8, 6, 6, 12, 12, 4, 4, 2, 2, 2, 2, 2, 6, 2, 2, 6, 6, 6, 6
Offset: 1

Views

Author

Wolfdieter Lang, Apr 21 2019

Keywords

Comments

The length of row n is 2*A307236(n). This is the number of primitive reduced binary quadratic forms of discriminant 4*D(n), with D(n) = A000037(n).
The number of cycles in row n is A307359(n), the class number h(n) of binary quadratic forms of discriminant 4*D(n).
The principal cycle starts with F_p(n) = [1, 2*s(n), -(D(n) -s(n))^2], with s(n) = A000194(n). Its period is A307372(n). This is the only cycle (the class number is 1) for n = 1, 3, 10, 13, 24, ...
For class number h(n) >= 2 the cycles come mostly in pairs of cycles which can be transformed into each other by a sign flip operation on the outer entries of the forms of the cycle (called outer sign flip). Exceptions occur if cycles are identical with their outer sign flipped ones. This happens, e.g., for n = 7 with two cycles: one of length 2 (the principal cycle CR(2)) and one of length 6. This 6-cycle is also identical to the outer sign flipped one. See the example below.
See the Buell and Scholz-Schoeneberg references for cycles and class number, and also the W. Lang link given in A324251, with Table 2.

Examples

			The irregular triangle T(n, k) begins:
n,  D(n) \k   1  2  3  4 ...              2*A307236
---------------------------------------------------
1,   2:       2                              2
2,   3:       2  2                           4
3,   5:       2                              2
4,   6:       2  2                           4
5,   7:       4  4                           8
6,   8:       2  2                           4
7,  10:       2  6                           8
8,  11:       2  2                           4
9,  12:       2  2                           4
10, 13:      10                             10
11, 14:       4  4                           8
12, 15:       2  2  2  2                     8
13, 17:       2                              2
14, 18:       2  2                           4
15, 19:       6  6                          12
16, 20:       2  2                           4
17, 21:       6  6                          12
18, 22:       6  6                          12
19, 23:       4  4                           8
20, 24:       2  2  4  4                    12
...
---------------------------------------------------
n = 1, D(1) = 2: the only cycle is the principal 2-cycle [[1, 2, -1],[-1, 2, 1]] with discriminant 8.
n = 2, D(2) = 3: besides the principal 2-cycle [[1, 2, -2], [-2, 2, 1]] there is another 2-cycle with sign flips in the outer form entries [[2, 2, -1], [-1, 2, 2]], all with discriminant 12.
n = 7, D(7) = 10: the principal 2-cycle CR(7) is ([1, 6, -1], [-1, 6, 1]). The other 6-cyle is ([3, 4, -2], [-2, 4, 3], [3, 2, -3], [-3, 4, 2], [2, 4, -3], [-3, 2, 3]). Both cycles are invariant under outer entries sign flips.
		

References

  • D. A. Buell, Binary Quadratic Forms, Springer, 1989.
  • A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, 5. Aufl., de Gruyter, Berlin, New York, 1973.

Crossrefs

Formula

T(n, k) = length of k-th cycle of reduced forms of discriminant 4*D(n), with D(n) = A000037(n).
Showing 1-5 of 5 results.