login
A391597
a(n) is the number of quadratic polynomials with coefficients in {-n, ..., n}, positive leading coefficient, and having two integer roots.
4
4, 14, 24, 43, 53, 79, 89, 118, 137, 163, 173, 222, 232, 258, 284, 326, 336, 385, 395, 444, 470, 496, 506, 583, 602, 628, 657, 706, 716, 786, 796, 852, 878, 904, 930, 1023, 1033, 1059, 1085, 1162, 1172, 1242, 1252, 1301, 1350, 1376, 1386, 1498, 1517, 1566, 1592, 1641, 1651, 1728
OFFSET
1,1
FORMULA
a(n) = Sum_{u = 1..n} b(floor(n/u)), where b = A067274 (obtained in collaboration with Sean A. Irvine). Proof sketch: consider a polynomial u*x^2+v*x+w with integer roots r and s. Then v = -u*(r+s) and w = u*r*s; so the constraint max(|v|, |w|) <= n is equivalent to max(|r+s|, |r*s|) <= floor(n/u). Therefore, the number of admissible pairs (r, s) is b(floor(n/u)) and the formula follows.
a(n) = 2*(A006218(n)+A061201(n))+A013936(n)-n. - Chai Wah Wu, Jan 28 2026
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) = 14 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.
PROG
(Python)
from math import isqrt
def A067274(n): return (n-(s:=isqrt(n))**2+(sum(n//k for k in range(1, s+1))<<1)<<1)+s-1 if n else 1
def A391597(n):
c, j = 0, 1
while j <= n:
c += A067274(k:=n//j)*(-j+(j:=n//k+1))
return c # Chai Wah Wu, Jan 28 2026
CROSSREFS
Cf. A067274, A391527 (quadratic, rational), A391108 (cubic, integer), A392944 (cubic, rational), A006218, A061201, A013936.
Sequence in context: A277591 A017317 A195973 * A116963 A094930 A289665
KEYWORD
nonn
AUTHOR
STATUS
approved