%I #11 Apr 10 2016 04:56:00
%S 0,6,84,374,1108,2606,5264,9522,15972,25242,38132,55322,77816,106510,
%T 142588,187078,241228,306318,383912,475266,582100,706010,848788,
%U 1012050,1197920,1408190,1645268,1910854,2207436,2537118,2902896,3306402
%N Number of cubic equations ax^3 + bx^2 + cx + d = 0 with integer coefficients |a|,|b|,|c|,|d| <= n, a <> 0, having three distinct real roots.
%C Clearly each term is even as ax^3 + bx^2 + cx + d = 0 and -ax^3 - bx^2 - cx - d = 0 have the same roots.
%C The variable D in the PARI program below is the discriminant of the reduced form y^3 + py + q = 0.
%D Jan Gullberg, Mathematics, From the Birth of Numbers, W. W. Norton & Co., NY, pages 318-9.
%H Gheorghe Coserea, <a href="/A155191/b155191.txt">Table of n, a(n) for n = 0..128</a>
%o (PARI) {for(n=0, 32, c=0; forvec(xx=[[ -n,n],[ -n,n],[ -n,n],[ -n,n]],
%o if(xx[1]==0, next, z=Pol(xx); x=y-xx[2]/(3*xx[1]);
%o zz=eval(z); if(polcoeff(zz,3)<>1, zz=zz/polcoeff(zz,3));
%o p=polcoeff(zz,1); q=polcoeff(zz,0); D=(q/2)^2+(p/3)^3;
%o if(D<0, c++))); print1(c,","))}
%o (PARI)
%o Delta(a,b,c,d) = b^2*c^2 - 4*a*c^3 - 4*b^3*d - 27*a^2*d^2 + 18*a*b*c*d;
%o seq(n) = {
%o my(a = vector(n));
%o forvec(v=[[1, n], [-n, n], [-n, n], [-n, n]],
%o if (Delta(v[1], v[2], v[3], v[4]) > 0, a[vecmax(abs(v))]++));
%o for (i = 2, #a, a[i] += a[i-1]);
%o return(concat(0, 2*a));
%o };
%o seq(31) \\ _Gheorghe Coserea_, Apr 09 2016
%Y Cf. A155192, A155193.
%K nonn
%O 0,2
%A _Rick L. Shepherd_, Jan 21 2009