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.

A232551 Number of distinct primitive quadratic forms of discriminant -4n that exist such that every prime p for which -n is a quadratic residue mod p can be represented by one of them.

Original entry on oeis.org

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

Views

Author

V. Raman, Nov 26 2013

Keywords

Comments

This is closely related to the class number problem.
A quadratic form is primitive if the GCD of the coefficients is 1. For example, the quadratic form 2*x^2+4*y^2 is not primitive.
Two quadratic forms f(x,y) = a*x^2+b*x*y+c*y^2 and g(x,y) = p*x^2+q*x*y+r*y^2 are distinct (or inequivalent) if and only if one cannot be obtained by a linear transformation (of the variables x, y) from the other. For example, the three quadratic forms u(x,y) = 3*x^2+2*x*y+3*y^2, v(x,y) = 3*x^2+4*x*y+4*y^2 and w(x,y) = 3*x^2+10*x*y+11*y^2 are equivalent because v(x,y) = u(x+y,-y) and w(x,y) = v(x+y,y). Also, w(x,y) = u(x+2*y,-y). Similarly, the two quadratic forms s(x,y) = 8*x^2+9*y^2 and t(x,y) = 17*x^2+50*x*y+41*y^2 are equivalent because t(x,y) = s(x+2*y,x+y).
The quadratic form x^2+n*y^2 is one such form and the only such form if n = 1, 2, 3, 4, 7.
a(n) = 1 if and only if n = 1, 2, 3, 4, 7.
If n is a squarefree convenient number (A000926), a(n) represents the class number of the ring Z[sqrt(n)] if n == 1 (mod 4) or if n == 2 (mod 4) and the class number of the ring Z[(1+sqrt(n))/2] if n == 3 (mod 4) and this class number is a power of 2.
Any prime p such that -n is a quadratic residue mod p can be represented by exactly one of the a(n) distinct primitive quadratic forms of discriminant = -4n in at most four different ways (if n >= 2) or in at most eight different ways (if n = 1).
If n is a prime congruent to 3 (mod 4), then a(n) = A232550(n).
If p is a prime, p^2 does not divide n, and p > 2 if n == 3 (mod 8), then there is a multiple of p in which p is raised to an odd power which can be written in the form x^2+n*y^2 if and only if -n is a quadratic residue mod p.
The product of two numbers (prime or composite, same or different) which can be represented by the same quadratic form of discriminant = -4n can be written in the form x^2+n*y^2, as the following identity shows:
(X*a^2+Y*a*b+Z*b^2)*(X*c^2+Y*c*d+Z*d^2) = (a*c*X+b*d*Z+a*d*(Y/2)+b*c*(Y/2))^2 + ((X*Z)-(Y^2/4))*(a*d-b*c)^2.
(X*a^2+Y*a*b+Z*b^2)*(X*c^2+Y*c*d+Z*d^2) = (a*c*X+b*d*((Y^2/(2*X))-Z)+a*d*(Y/2)+b*c*(Y/2))^2 + ((X*Z)-(Y^2/4))*(b*d*(Y/X)+a*d+b*c)^2.
Note that for the latter equation, (a*c*X+b*d*((Y^2/(2*X))-Z)+a*d*(Y/2)+b*c*(Y/2)) and (b*d*(Y/X)+a*d+b*c) need not always be integers. If they are both integers, then it will be a second representation of the product of (X*a^2+Y*a*b+Z*b^2) and (X*c^2+Y*c*d+Z*d^2) in the form x^2+((X*Z)-(Y^2/4))*y^2.
This sequence is the same as taking every fourth number in A107628. - T. D. Noe, Jan 02 2014

Examples

			If n = 1, 2, 3, 4 or 7, then the only such available quadratic form is x^2+n*y^2.
For n = 5, every prime that is congruent to {1, 2, 3, 5, 7, 9} mod 20 can be represented by either of the two distinct primitive quadratic forms of discriminant = -20: x^2+5*y^2 or 2*x^2+2*x*y+3*y^2.
For n = 6, every prime that is congruent to {1, 2, 3, 5, 7, 11} mod 24 can be represented by either of the two distinct primitive quadratic forms of discriminant = -24: x^2+6*y^2 or 2*x^2+3*y^2.
For n = 10, every prime that is congruent to {1, 2, 5, 7, 9, 11, 13, 19, 23, 37} mod 40 can be represented by either of the two distinct primitive quadratic forms of discriminant = -40: x^2+10*y^2 or 2*x^2+5*y^2.
		

Crossrefs

Cf. A000003, A000926, A232529, A232530, A232550 (Number of distinct primitive quadratic forms of discriminant = -4*n needed to generate all primes p for which p is a quadratic residue (mod 4*n) or p-n is a quadratic residue (mod 4*n)).

A067752 Number of unordered solutions of xy + xz + yz = n in nonnegative integers.

Original entry on oeis.org

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

Views

Author

Colin Mallows, Jan 31 2002

Keywords

Comments

An upper bound on the number of solutions appears to be 1.5*sqrt(n). - T. D. Noe, Jun 14 2006
a(n) is also the total number of distinct quadratic forms of discriminant -4n. A232551 counts only the primitive quadratic forms of discriminant -4n (those with all coefficients pairwise coprime) and A234287 includes those by which some prime can be represented (those with all coefficients pairwise coprime or coefficient of x^2 is prime or coefficient of y^2 is prime). This sequence includes all quadratic forms like 2x^2 + 2xy + 4y^2 and 2x^2 + 4y^2 which are non-primitive and those like 4x^2 + 2xy + 4y^2 and 4x^2 + 4xy + 4y^2 by which no prime can be represented (those with no restrictions). - V. Raman, Dec 24 2013

Examples

			a(12)=4 because of (0,1,12), (0,2,6), (0,3,4), (2,2,2).
a(20)=5 because of (0,1,20), (0,2,10), (0,4,5), (1,2,6), (2,2,4).
		

Crossrefs

Programs

  • Mathematica
    Table[cnt=0; Do[z=(n-x*y)/(x+y); If[IntegerQ[z], cnt++ ], {x,0,Sqrt[n/3]}, {y, Max[1,x],Sqrt[x^2+n]-x}]; cnt, {n,100}] (* T. D. Noe, Jun 14 2006 *)

Extensions

Corrected, extended and edited by John W. Layman, Dec 03 2004

A234287 Number of distinct quadratic forms of discriminant -4n by which some prime can be represented.

Original entry on oeis.org

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

Views

Author

V. Raman, Dec 22 2013

Keywords

Comments

This is similar to A232551, except that this includes non-primitive quadratic forms like 2x^2+2xy+4y^2 and 2x^2+4y^2 because the prime 2 can be represented by both of them. But unlike A067752, we do not include quadratic forms like 4x^2+2xy+4y^2 and 4x^2+4xy+4y^2 by which no prime can be represented.
So, when n == 3 (mod 4), this includes the additional non-primitive quadratic form 2x^2+2xy+((n+1)/2)y^2 and when p^2 divides n, where p is prime, this includes the additional non-primitive quadratic form px^2+(n/p)y^2.
If p is a prime and if p^2 does not divide n, then there exist a unique non-primitive quadratic form of discriminant = -4n by which p can be represented if and only if -n is a quadratic residue (mod p) and there exists a multiple of p which can be written in the form x^2+ny^2 in which p appears raised to an odd power, except when p = 2 and n == 3 (mod 8).

Crossrefs

A234001 Lowest common modulus to which the set of residue classes (mod 4n) that all the primes represented by a certain quadratic form of discriminant = -4n belong to, can be simplified to, for all quadratic forms of discriminant = -4n.

Original entry on oeis.org

4, 8, 3, 4, 20, 24, 14, 8, 12, 40, 11, 12, 52, 56, 30, 8, 68, 24, 19, 20, 84, 88, 46, 24, 20, 104, 3, 28, 116, 120, 62, 8, 132, 136, 35, 12, 148, 152, 78, 40, 164, 168, 43, 44, 60, 184, 94, 24, 28, 40, 51, 52, 212, 24, 110, 56, 228, 232, 59, 60, 244, 248, 42, 8, 260, 264, 67, 68, 276, 280
Offset: 1

Views

Author

V. Raman, Dec 18 2013

Keywords

Comments

If n is a convenient number (A000926), the set of residue classes (mod 4n) that a prime p represented by x^2+n*y^2 belong to are those for which p is a quadratic residue (mod 4n) or p-n is a quadratic residue (mod 4n), assuming that p^2 does not divide n. For non-convenient numbers n, some of the primes in these set of residue classes (mod 4n) can be represented by x^2+n*y^2, but not all.
A prime p such that p^2 does not divide n, can be represented by some primitive quadratic form of discriminant = -4n, if and only if -n is a quadratic residue (mod p).
A prime p can be represented by some quadratic form of discriminant = -4n if and only if there is a multiple of p that can be written in the x^2+n*y^2 form, in which prime factor of p appears raised to an odd power or if p = 2 and n == 3 (mod 4).
a(n) is always a divisor of 4n.
If n is squarefree and n == 1 (mod 4) or n == 2 (mod 4), then a(n) = 4n.
If p^2 divides n for some prime p, a(n) is a divisor of (4n)/p.
If n == 3 (mod 8), then a(n) is a divisor of n because numbers of the form x^2+n*y^2 cannot have any prime factors that are congruent to 2+n (mod 2n) raised to an odd power.
If n == 7 (mod 8), then a(n) is a divisor of 2n because numbers of the form x^2+n*y^2 can have prime factors that are congruent to 2+n (mod 2n) raised to an odd power, but they cannot be congruent to 2 (mod 4). So, we need to characterize the prime factor of 2 from the remaining prime factors that are congruent to 2+n (mod 2n) separately.

Examples

			For n = 7, consider the set of all residue classes to which a prime represented by the quadratic form x^2+7*y^2 belong to, {1, 9, 11, 15, 23, 25} mod 28. This can be simplified to {1, 9, 11} mod 14 and this is the lowest modulo this set of residue classes can be simplified to. So, a(7) = 14. x^2+7*y^2 is the only primitive quadratic form of discriminant = -28.
For n = 15, there are two quadratic forms of discriminant = -60, x^2+15*y^2 and 3*x^2+5*y^2. x^2+15*y^2 can be used to represent all primes in set of residue classes {1, 4} mod 15. 3*x^2+5*y^2 can be used to represent all primes in set of residue classes {3, 5, 17, 23} mod 30. The lowest common modulo is 30, because {1, 4} mod 15 can also be written as {1, 4, 16, 19} mod 30, and so a(15) = 30.
		

Crossrefs

A234002 4n/A234001(n).

Original entry on oeis.org

1, 1, 4, 4, 1, 1, 2, 4, 3, 1, 4, 4, 1, 1, 2, 8, 1, 3, 4, 4, 1, 1, 2, 4, 5, 1, 36, 4, 1, 1, 2, 16, 1, 1, 4, 12, 1, 1, 2, 4, 1, 1, 4, 4, 3, 1, 2, 8, 7, 5, 4, 4, 1, 9, 2, 4, 1, 1, 4, 4, 1, 1, 6, 32, 1, 1, 4, 4, 1, 1, 2, 12, 1, 1, 20, 4, 1, 1, 2, 8, 27, 1, 4, 4, 1, 1, 2, 4, 1, 3, 4, 4, 1, 1, 2
Offset: 1

Views

Author

V. Raman, Dec 18 2013

Keywords

Comments

Please look into A234001 for a more detailed description.
If n is squarefree and n == 1 (mod 4) or n == 2 (mod 4), then a(n) = 1.
If p^2 divides n for some prime p, a(n) is a multiple of p.
If n == 3 (mod 8), then a(n) is a multiple of 4 because numbers of the form x^2+n*y^2 cannot have any prime factors that are congruent to 2+n (mod 2n) raised to an odd power.
If n == 7 (mod 8), then a(n) is a multiple of 2 because numbers of the form x^2+n*y^2 can have prime factors that are congruent to 2+n (mod 2n) raised to an odd power, but they cannot be congruent to 2 (mod 4). So, we need to characterize the prime factor of 2 from the remaining prime factors that are congruent to 2+n (mod 2n) separately.

Crossrefs

Showing 1-5 of 5 results.