login
A391527
a(n) is the number of quadratic polynomials with coefficients in {-n, ..., n}, positive leading coefficient, and having two rational roots.
3
4, 18, 44, 88, 138, 212, 296, 406, 524, 674, 814, 1024, 1194, 1416, 1662, 1946, 2180, 2526, 2794, 3176, 3552, 3938, 4278, 4808, 5232, 5706, 6204, 6776, 7206, 7936, 8416, 9072, 9708, 10342, 11032, 11950, 12532, 13246, 14026, 15010, 15664, 16718, 17418, 18402, 19470
OFFSET
1,1
COMMENTS
a(n) is also the number of quadratic polynomials with coefficients in {-n, ..., n}, positive leading coefficient, and whose splitting field is Q.
EXAMPLE
For n = 1, the a(1) = 4 polynomials with coefficients in {-1, 0, 1} are: x^2-x, x^2-1, x^2, x^2+x.
For n = 2, the a(2) = 18 polynomials with coefficients in {-2, -1, 0, 1, 2} are: x^2-2x, x^2-2x+1, x^2-x-2, x^2-x, x^2-1, x^2, x^2+x-2, x^2+x, x^2+2x, x^2+2x+1, 2x^2-2x, 2x^2-2, 2x^2, 2x^2+2x, 2x^2-x-1, 2x^2-x, 2x^2+x-1, 2x^2+x.
MAPLE
a := proc(n)
local d, i, j, k:
d := 0:
for i from 1 to n do
for j from -n to n do
for k from -n to n do
if issqr(j^2-4*i*k) then d := d+1: fi: od: od: od:
d: end:
seq(a(r), r = 1 .. 45);
MATHEMATICA
a[n_]:=Count[Flatten @ Table[j^2 - 4 i k, {i, 1, n}, {j, -n, n}, {k, -n, n}], m_/; IntegerQ[Sqrt[m]] && m >= 0 ]; Array[a, 45] (* James C. McMahon, Feb 02 2026 *)
CROSSREFS
Cf. A391597 (quadratic, integer), A391108 (cubic, integer), A392944 (cubic, rational).
Sequence in context: A023618 A366985 A396180 * A115077 A278046 A258634
KEYWORD
nonn
AUTHOR
STATUS
approved