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.

Previous Showing 11-13 of 13 results.

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

A281914 Number of ordered integer pairs (b,c), with -n<=b<=n, -n<=c<=n, such that both roots of 3x^2+bx+c = 0 are rational and b and are not both multiples of 3.

Original entry on oeis.org

2, 8, 8, 16, 24, 24, 34, 46, 46, 60, 72, 74, 86, 100, 104, 122, 132, 132, 142, 164, 168, 182, 192, 200, 214, 228, 228, 250, 260, 268, 278, 300, 304, 318, 336, 340, 350, 364, 368, 398, 408, 416, 426, 448, 452, 466, 476, 488, 502, 524
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 3. When there is an overall factor of 3 we get the sequence A067274. These results have been proved and will appear in an upcoming paper.

Examples

			The four quadratics for a(2)=8 and their roots are as follows:
3*x^2 + 2*x + 0 = x(2 + 3*x);         x =  0, x = -2/3.
3*x^2 + 2*x - 1 = (1 + x)(- 1 + 3*x); x = -1, x = +1/3.
3*x^2 + 1*x + 0 = x(1 + 3*x);         x =  0, x = -1/3.
3*x^2 + 1*x - 2 = (1 + x)(- 2 + 3*x); x = -1, x = +2/3.
3*x^2 - 1*x + 0 = x(- 1 + 3*x);       x =  0, x = +1/3.
3*x^2 - 1*x - 2 = (- 1 + x)(2 + 3*x); x = +1, x = -2/3.
3*x^2 - 2*x + 0 = x(- 2 + 3*x);       x =  0, x = +2/3.
3*x^2 - 2*x - 1 = (- 1 + x)(1 + 3*x); x = +1, x = -1/3.
There is one case where there is an overall factor of 3 which is counted in series A067274.
		

Crossrefs

Cf. A067274.

Programs

  • Mathematica
    a[n_] :=
    2 (2 + Floor[(n + 1)/3] + Floor[(n - 1)/3] + Floor[(n + 2)/3] +
         Floor[(n - 2)/3]) +
      2 (KroneckerDelta[4, If[n == 4, 4, 0]] -
         KroneckerDelta[8, If[n == 8, 8, 0]] -
         KroneckerDelta[9, If[n == 9, 9, 0]] -
         KroneckerDelta[10, If[n == 10, 10, 0]] -
         KroneckerDelta[12, If[n == 12, 12, 0]]) +
      If[n >= 4,
       2 (-4 - 2 n - 2 Floor[n/2] + Floor[2 (n + 1)/3] +
          2 Sum[Length[Divisors[k]], {k, n}] -
          2 Sum[Length[Divisors[k]], {k, Floor[n/3]}]), 0];
    (* The KroneckerDelta is a special case correction term. *)
    a[1] = 2; (* Extends the a[n] series by direct count. *)

A330407 Number of ordered integer pairs (b,c) with -n <= b <= n and -n <= c <= n such that both roots of x^2 + b*x + c = 0 are distinct integers.

Original entry on oeis.org

0, 3, 7, 13, 20, 26, 36, 42, 52, 59, 69, 75, 89, 95, 105, 115, 126, 132, 146, 152, 166, 176, 186, 192, 210, 217, 227, 237, 251, 257, 275, 281, 295, 305, 315, 325, 344, 350, 360, 370, 388, 394, 412, 418, 432, 446, 456, 462, 484, 491, 505, 515, 529, 535, 553, 563, 581
Offset: 0

Views

Author

Alexander Piperski, Jan 25 2020

Keywords

Examples

			For n = 1, the a(1) = 3 equations are x^2 - x = 0, x^2 + x = 0, and x^2 - 1 = 0.
For n = 2, the a(2) = 7 equations are the 3 equations listed above and x^2 - 2x = 0, x^2 + 2x = 0, x^2 - x - 2 = 0, and x^2 + x - 2 = 0.
		

Crossrefs

Programs

  • Mathematica
    ok[b_, c_] := Block[{d = b^2 - 4 c}, d > 0 && IntegerQ@ Sqrt@ d];  a[n_] := Sum[ Boole@ ok[b, c], {b, -n, n}, {c, -n, n}]; Array[a, 57, 0] (* Giovanni Resta, Jan 28 2020 *)
  • PARI
    isok(b,c) = (b^2 > 4*c) && issquare(b^2-4*c);
    a(n) = sum(b=-n, n, sum(c=-n, n, isok(b,c))); \\ Michel Marcus, Jan 28 2020

Formula

a(n) = A067274(n) - A001650(n+1) for n > 1.

Extensions

a(0)=0 prepended by Michel Marcus, Jan 30 2020
Previous Showing 11-13 of 13 results.