cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Lorenz H. Menke, Jr., Feb 02 2017

Keywords

Comments

We are not counting the cases where there is a possible overall factor of 2. When there is an overall factor of 2 we obtain the sequence A067274. These results have been proved and will appear in an upcoming paper.

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. *)