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
KEYWORD
nonn
AUTHOR
Lorenzo Sauras Altuzarra, Jan 15 2026
STATUS
approved
