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

A191408 Duplicate of A006641.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 3, 2, 3, 2, 4, 2, 1, 5, 2, 2, 4, 4, 3, 1, 4, 7, 5, 3, 4, 6, 2, 2, 8, 5, 6, 3, 8, 2, 6, 10, 4, 2, 5, 5, 4, 4, 3, 10, 2, 7, 6, 4, 10, 1, 8, 11, 4, 5, 8, 4, 2, 13, 4, 9, 4, 3, 6, 14, 4, 7, 5, 4, 12, 2, 2, 15, 6, 6, 8, 7, 12, 4, 8, 13, 8, 2, 11, 8, 4, 3, 14, 4, 4, 8, 10, 8
Offset: 1

Views

Author

Robert G. Wilson v, Jun 01 2011

Keywords

Comments

Same as A006641. - Georg Fischer, Oct 12 2018

Crossrefs

Cf. A191410.

Programs

  • Mathematica
    FundamentalDiscriminantQ[n_Integer] := n != 1 && (Mod[n, 4] == 1 || !Unequal[ Mod[n, 16], 8, 12]) && SquareFreeQ[n/2^IntegerExponent[n, 2]] (* via Eric W. Weisstein *);
    NumberFieldClassNumber@ Sqrt@ # & /@ Select[-Range@ 300, FundamentalDiscriminantQ]
  • PARI
    for(n=1, 300, if(isfundamental(-n), print1(quadclassunit(-n).no, ", "))) \\ Andrew Howroyd, Jul 23 2018

Formula

Class number of A003657(n).

Extensions

Terms corrected by Andrew Howroyd and Robert G. Wilson v, Jul 24 2018

A107628 Number of integral quadratic forms ax^2 + bxy + cy^2 whose discriminant b^2-4ac is -n, 0 <= b <= a <= c and gcd(a,b,c) = 1.

Original entry on oeis.org

0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 0, 0, 1, 2, 0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 2, 2, 0, 0, 3, 2, 0, 0, 1, 2, 0, 0, 3, 2, 0, 0, 2, 2, 0, 0, 3, 3, 0, 0, 2, 2, 0, 0, 3, 2, 0, 0, 1, 3, 0, 0, 4, 2, 0, 0, 2, 2, 0, 0, 3, 3, 0, 0, 2, 4, 0, 0, 4, 2, 0, 0, 2, 2, 0, 0, 5, 4, 0, 0, 2, 2, 0, 0, 3, 4, 0
Offset: 1

Views

Author

T. D. Noe, May 18 2005, Apr 30 2008

Keywords

Comments

This sequence is closely related to the class number function, h(-n), which is given for fundamental discriminants in A006641. For a fundamental discriminant d, we have h(-d) < 2a(d). It appears that a(n) < Sqrt(n) for all n. For k>1, the primes p for which a(p)=k coincide with the numbers n such that the class number h(-n) is 2k-1 (see A006203, A046002, A046004, A046006. A046008, A046010, A046012, A046014, A046016 A046018, A046020). - T. D. Noe, May 07 2008

Examples

			a(15)=2 because the forms x^2 + xy + 4y^2 and 2x^2 + xy + 2y^2 have discriminant -15.
		

References

Crossrefs

Cf. A106856 (start of many quadratic forms).
Cf. A133675 (n such that a(n)=1).
Cf. A223708 (without zeros).

Programs

  • Mathematica
    dLim=150; cnt=Table[0, {dLim}]; nn=Ceiling[dLim/4]; Do[d=b^2-4a*c; If[GCD[a, b, c]==1 && 0<-d<=dLim, cnt[[ -d]]++ ], {b, 0, nn}, {a, b, nn}, {c, a, nn}]; cnt
  • PARI
    {a(n)=local(m); if(n<3, 0, forvec(v=vector(3,k,[0,(n+1)\4]), if( (gcd(v)==1)&(-v[1]^2+4*v[2]*v[3]==n), m++ ), 1); m)} /* Michael Somos, May 31 2005 */

A102264 Smallest prime for which 2^n exactly divides the class number h(-4p).

Original entry on oeis.org

5, 17, 41, 257, 521, 4481, 9521, 21929, 72089, 531977, 1256009, 5014169, 20879129, 70993529, 258844361, 866941841, 3771185921, 13949589209, 57388297721
Offset: 1

Views

Author

N. J. A. Sloane, Feb 19 2005

Keywords

Crossrefs

Cf. A006641.

Programs

  • Sage
    def a(n):
        for p in Primes():
            if QuadraticField(-p).class_number().valuation(2)==n:
                return p  # Robin Visser, May 25 2024

Extensions

a(10)-a(17) from Robin Visser, May 25 2024
a(18)-a(19) from Robin Visser, Dec 28 2024

A106031 a(n) is the number of orbits under the action of GL_2[Z] on the primitive binary quadratic forms of discriminant D, where D < 0 is the n-th fundamental discriminant.

Original entry on oeis.org

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

Views

Author

Steven Finch, May 05 2005

Keywords

Comments

A006641 is the same except it is under the action of SL_2[Z].

Examples

			D = -3, -4, -7, -8, -11, -15, -19, -20, -23, -24, -31, ...,
that is, A003657 negated.
		

Crossrefs

Showing 1-4 of 4 results.