A281913 Number of ordered integer pairs (b,c), with -n<=b<=n, -n<=c<=n, such that both roots of 2x^2+bx+c=0 are rational and b and c are not both even.
4, 4, 12, 12, 22, 24, 36, 36, 50, 54, 64, 68, 78, 82, 100, 100, 110, 118, 128, 132, 150, 154, 164, 168, 182, 186, 204, 208, 218, 230, 240, 240, 258, 262, 280, 288, 298, 302, 320, 324, 334, 346, 356, 360, 386, 390, 400, 404, 418, 426
Offset: 1
Keywords
Examples
The four quadratics for a(2)=4 and their roots are as follows: 2*x^2 + 1*x + 0 = x(1 + 2*x); x = 0, x = -1/2. 2*x^2 + 1*x - 1 = (1 + x)(- 1 + 2*x); x = -1, x = +1/2. 2*x^2 - 1*x + 0 = x(- 1 + 2*x); x = 0, x = +1/2. 2*x^2 - 1*x - 1 = (- 1+ x)(1 + 2*x); x = +1, x = -1/2. There are nine cases where there is an overall factor of 2 which are counted in series A067274.
Crossrefs
Cf. A067274.
Programs
-
Mathematica
a[n_] := If[n >= 3, 2 (-2 - 2 n + Floor[(n + 1)/2] + 2 Sum[Length[Divisors[k]], {k, n}] - 2 Sum[Length[Divisors[k]], {k, Floor[n/2]}]), 0] + 4 Floor[(n + 1)/2] - 2 KroneckerDelta[6, If[n == 6, 6, 0]]; (* The KroneckerDelta is a special case correction term. *) a[1] = 4; (* Extends the a[n] series by direct count. *)
Comments