login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 3
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,15

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

REFERENCES

See A106856.

LINKS

T. D. Noe, Table of n, a(n) for n=1..10000

EXAMPLE

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

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

PROG

(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 */

CROSSREFS

Cf. A106856 (start of many quadratic forms).

Cf. A133675 (n such that a(n)=1).

Cf. A223708 (without zeros).

Sequence in context: A263860 A051777 A262709 * A268389 A288969 A305355

Adjacent sequences: A107625 A107626 A107627 * A107629 A107630 A107631

KEYWORD

nonn

AUTHOR

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

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 27 05:12 EST 2022. Contains 358362 sequences. (Running on oeis4.)