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 21-30 of 52 results. Next

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

A094376 Least number having exactly n representations as ab+ac+bc with 0 < a < b < c.

Original entry on oeis.org

1, 11, 23, 41, 47, 59, 71, 116, 119, 131, 164, 425, 191, 236, 239, 446, 335, 419, 311, 404, 431, 584, 647, 524, 479, 1019, 831, 776, 671, 944, 719, 1076, 839, 1004, 959, 1889, 1196, 2099, 1271, 1856, 1151, 1931, 1391, 1676, 1319, 1616, 1751, 3275, 1511
Offset: 0

Views

Author

T. D. Noe and Robert G. Wilson v, Apr 28 2004

Keywords

Comments

Note that the Mathematica program computes A094376, A094377 and A094378, but outputs only this sequence.

Examples

			a(2) = 23 because 23 is the least number with 2 representations: (a,b,c) = (1,2,7) and (1,3,5).
		

References

Crossrefs

Cf. A000926 (n having no representations), A093669 (n having one representation), A025052, A094377, A094378.

Programs

  • Maple
    f:= proc(n) local a, t, s;
      t:= 0;
      for a from 1 to floor(sqrt(n/3)) do
        t:= t + nops(select(s -> s > 2*a and n+a^2 > s^2, numtheory:-divisors(n+a^2)))
      od;
      t
    end proc:
    N:= 200: # for a(0)..a(N)
    V:= Array(0..N): count:= 0:
    for n from 1 while count < N+1 do
       v:= f(n); if v <= N and V[v] = 0 then
          count:= count+1; V[v]:= n; fi
    od:
    seq(V[i],i=0..N); # Robert Israel, May 05 2021
  • Mathematica
    cntMax=10; nSol=Table[{0, 0, 0}, {cntMax+1}]; Do[lim=Ceiling[(n-2)/3]; cnt=0; Do[If[n>a*b && Mod[n-a*b, a+b]==0 && Quotient[n-a*b, a+b]>b, cnt++; If[cnt>cntMax, Break[]]], {a, 1, lim-1}, {b, a+1, lim}]; If[cnt<=cntMax, If[nSol[[cnt+1, 1]]==0, nSol[[cnt+1, 1]]=n]; nSol[[cnt+1, 2]]=n; nSol[[cnt+1, 3]]++;], {n, 10000}]; Table[nSol[[i, 1]], {i, cntMax+1}]

A094377 Greatest number having exactly n representations as ab+ac+bc with 0 < a < b < c.

Original entry on oeis.org

1848, 193, 1012, 862, 3040, 2062, 4048, 3217, 7392, 4162, 7837, 8002, 12397, 13297, 14722, 16417, 21253, 21058, 30493, 27358, 34357, 34318, 47338, 40177, 50317, 39502, 61462, 62302, 73117, 83218, 106177, 67138, 92698, 102958, 134773, 111577, 112942, 121522, 104938, 96958, 151237, 166798, 150382, 139393, 190513, 129838
Offset: 0

Views

Author

T. D. Noe, Apr 28 2004

Keywords

Comments

Numbers up to 250,000 were checked. Note that the Mathematica program computes A094376, A094377 and A094378, but outputs only this sequence.

Examples

			a(1) = 193 because 193 is the largest number with a unique representation: (a,b,c) = (4,7,15).
		

References

Crossrefs

Cf. A000926 (n having no representations), A093669 (n having one representation), A094376, A094378.

Programs

  • Mathematica
    cntMax=10; nSol=Table[{0, 0, 0}, {cntMax+1}]; Do[lim=Ceiling[(n-2)/3]; cnt=0; Do[If[n>a*b && Mod[n-a*b, a+b]==0 && Quotient[n-a*b, a+b]>b, cnt++; If[cnt>cntMax, Break[]]], {a, 1, lim-1}, {b, a+1, lim}]; If[cnt<=cntMax, If[nSol[[cnt+1, 1]]==0, nSol[[cnt+1, 1]]=n]; nSol[[cnt+1, 2]]=n; nSol[[cnt+1, 3]]++;], {n, 10000}]; Table[nSol[[i, 2]], {i, cntMax+1}]

Extensions

More terms (using limit 10^6) from Joerg Arndt, Oct 01 2017

A033266 Numbers n such that every genus of binary quadratic forms of discriminant -4n consists of a single class and the class number h(-4n) = 2.

Original entry on oeis.org

5, 6, 8, 9, 10, 12, 13, 15, 16, 18, 22, 25, 28, 37, 58
Offset: 1

Views

Author

Keywords

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 60.
  • G. B. Mathews, Theory of Numbers, Chelsea, no date, p. 263.

Crossrefs

A subsequence of A000926.

Programs

  • PARI
    ok(n)={my(u=quadclassunit(-4*n).cyc); #u==1 && !select(t->t<>2, u)} \\ Andrew Howroyd, Jun 09 2018

A033267 Numbers n such that every genus of binary quadratic forms of discriminant -4n consists of a single class and the class number h(-4n) = 4.

Original entry on oeis.org

21, 24, 30, 33, 40, 42, 45, 48, 57, 60, 70, 72, 78, 85, 88, 93, 102, 112, 130, 133, 177, 190, 232, 253
Offset: 1

Views

Author

Keywords

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 60.
  • G. B. Mathews, Theory of Numbers, Chelsea, no date, p. 263.

Crossrefs

A subsequence of A000926.

Programs

  • PARI
    ok(n)={my(u=quadclassunit(-4*n).cyc); #u==2 && !select(t->t<>2, u)} \\ Andrew Howroyd, Jun 09 2018

A033268 Numbers n such that every genus of binary quadratic forms of discriminant -4n consists of a single class and the class number h(-4n) = 8.

Original entry on oeis.org

105, 120, 165, 168, 210, 240, 273, 280, 312, 330, 345, 357, 385, 408, 462, 520, 760
Offset: 1

Views

Author

Keywords

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 60.
  • G. B. Mathews, Theory of Numbers, Chelsea, no date, p. 263.

Crossrefs

A subsequence of A000926.

Programs

  • PARI
    ok(n)={my(u=quadclassunit(-4*n).cyc); #u==3 && !select(t->t<>2, u)} \\ Andrew Howroyd, Jun 09 2018

A033269 Numbers n such that every genus of binary quadratic forms of discriminant -4n consists of a single class and the class number h(-4n) = 16.

Original entry on oeis.org

840, 1320, 1365, 1848
Offset: 1

Views

Author

Keywords

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 60.
  • G. B. Mathews, Theory of Numbers, Chelsea, no date, p. 263.

Crossrefs

A subsequence of A000926.

Programs

  • PARI
    ok(n)={my(u=quadclassunit(-4*n).cyc); #u==4 && !select(t->t<>2, u)} \\ Andrew Howroyd, Jun 09 2018

A094378 Number of numbers having exactly n representations as ab+ac+bc with 0 < a < b < c.

Original entry on oeis.org

65, 23, 91, 40, 197, 39, 195, 56, 298, 87, 217, 60, 512, 97, 327, 77, 562, 125, 433, 88, 712, 125, 484, 115, 924, 121
Offset: 0

Views

Author

T. D. Noe, Apr 28 2004

Keywords

Comments

Numbers up to 250,000 were checked. Note that there seem to be many more numbers having an even number of representations. Note that the Mathematica program computes A094376, A094377 and A094378, but outputs only this sequence.

Examples

			a(1) = 23 because there are 23 numbers (A093669) with unique representations.
		

References

Crossrefs

Cf. A000926 (n having no representations), A093669 (n having one representation), A094376, A094377.

Programs

  • Mathematica
    cntMax=10; nSol=Table[{0, 0, 0}, {cntMax+1}]; Do[lim=Ceiling[(n-2)/3]; cnt=0; Do[If[n>a*b && Mod[n-a*b, a+b]==0 && Quotient[n-a*b, a+b]>b, cnt++; If[cnt>cntMax, Break[]]], {a, 1, lim-1}, {b, a+1, lim}]; If[cnt<=cntMax, If[nSol[[cnt+1, 1]]==0, nSol[[cnt+1, 1]]=n]; nSol[[cnt+1, 2]]=n; nSol[[cnt+1, 3]]++;], {n, 10000}]; Table[nSol[[i, 3]], {i, cntMax+1}]

A026501 a(n) = least positive integer > a(n-1) and not a(j)*a(k) + a(k)*a(i) + a(i)*a(j) for 1<=i

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 15, 16, 18, 21, 22, 24, 25, 28, 30, 33, 37, 40, 42, 45, 48, 57, 58, 60, 70, 72, 78, 85, 88, 93, 100, 102, 105, 112, 120, 130, 133, 145, 148, 165, 168, 177, 190, 210, 217, 221, 232, 240, 253, 254, 262, 263, 267, 273, 277, 280
Offset: 1

Views

Author

Keywords

Comments

Unlike A000926, this sequence is infinite. The first term not in A000926 is a(37) = 100. - Ivan Neretin, Jul 29 2015

Crossrefs

Cf. A000926.

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    Allowed:= {$1..N}:
    for count from 1 while Allowed <> {} do
      a:= min(Allowed);
      A[count]:= a;
      Allowed:= Allowed minus{a, seq(seq(A[i]*A[j]+(A[i]+A[j])*a,j=1..i-1),i=1..count-1)};
    od:
    seq(A[i],i=1..count-1); # Robert Israel, Aug 11 2015
  • PARI
    oka(va, nv) = {for (i=1, nv, for (j=i+1, nv, for (k=j+1, nv, if (va[nv] == va[j]*va[k] + va[k]*va[i] + va[i]*va[j], return (0));););); return (1);}
    finda(va) = {na = vecmax(va) + 1; va = concat(va, na); while(! oka(va, #va), va[#va] = na++); na;}
    lista(nn) = {va = [1]; print1(1, ", "); for (n=1, nn, na = finda(va); print1(na, ", "); va = concat(va, na);); va;} \\ Michel Marcus, Aug 10 2015

Extensions

More terms from Jud McCranie
Previous Showing 21-30 of 52 results. Next