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.

Showing 1-4 of 4 results.

A257020 Numbers whose quarter-square representation consists of three terms.

Original entry on oeis.org

15, 19, 23, 28, 33, 35, 39, 41, 45, 47, 52, 54, 59, 61, 63, 67, 69, 71, 75, 77, 79, 80, 84, 86, 88, 89, 93, 95, 97, 98, 103, 105, 107, 108, 113, 115, 117, 118, 120, 124, 126, 128, 129, 131, 135, 137, 139, 140, 142, 143, 147, 149, 151, 152, 154, 155, 159, 161
Offset: 1

Views

Author

Clark Kimberling, Apr 15 2015

Keywords

Comments

Every positive integer is a sum of at most four distinct quarter squares (see A257019).

Examples

			Quarter-square representations:
r(15) = 12 + 2 + 1, three terms; a(1) = 15
r(19) = 16 + 2 + 1, three terms; a(2) = 19
		

Crossrefs

Cf. A002620, A257019, A257021, A257023 (trace), A257024 (number of square in quarter-square representation).

Programs

  • Mathematica
    z = 100; b[n_] := Floor[(n + 1)^2/4]; bb = Table[b[n], {n, 0, 100}];
    s[n_] := Table[b[n], {k, b[n + 1] - b[n]}];
    h[1] = {1}; h[n_] := Join[h[n - 1], s[n]];
    g = h[100]; r[0] = {0};
    r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]];
    u = Table[Length[r[n]], {n, 0, 4 z}];(* A257023 *)
    Flatten[-1 + Position[u, 1]]; (* A002620 *)
    Flatten[-1 + Position[u, 2]]; (* A257019 *)
    Flatten[-1 + Position[u, 3]]; (* A257020 *)
    Flatten[-1 + Position[u, 4]]; (* A257021 *)

A257056 Numbers k such that (# squares) < (# nonsquares) in the quarter-squares representation of k.

Original entry on oeis.org

2, 6, 8, 12, 14, 15, 20, 22, 23, 30, 32, 33, 42, 44, 45, 48, 56, 58, 59, 62, 63, 72, 74, 75, 78, 79, 80, 89, 90, 92, 93, 96, 97, 98, 108, 110, 112, 113, 116, 117, 118, 129, 132, 134, 135, 138, 139, 140, 143, 152, 156, 158, 159, 162, 163, 164, 167, 168, 177
Offset: 1

Views

Author

Clark Kimberling, Apr 15 2015

Keywords

Comments

Every positive integer is a sum of at most four distinct quarter squares; see A257019. The sequences A257056, A257057, A257058 partition the nonnegative integers.

Examples

			Quarter-square representations:
r(0) = 0
r(1) = 1
r(2) = 2, so that a(1) = 2
r(3) = 2 + 1
r(4) = 4
r(5) = 4 + 1
r(6) = 6, so that a(2) = 6
		

Crossrefs

Programs

  • Mathematica
    z = 400; b[n_] := Floor[(n + 1)^2/4]; bb = Table[b[n], {n, 0, 100}];
    s[n_] := Table[b[n], {k, b[n + 1] - b[n]}];
    h[1] = {1}; h[n_] := Join[h[n - 1], s[n]];
    g = h[100]; r[0] = {0};
    r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]];
    u = Table[Length[r[n]], {n, 0, z}]  (* A257023 *)
    v = Table[Length[Intersection[r[n], Table[n^2, {n, 0, 1000}]]], {n, 0, z}]  (* A257024 *)
    -1 + Select[Range[0, z], 2 v[[#]] < u[[#]] &]   (* A257056 *)
    -1 + Select[Range[0, z], 2 v[[#]] == u[[#]] &]  (* A257057 *)
    -1 + Select[Range[0, z], 2 v[[#]] > u[[#]] &]   (* A257058 *)

A257057 Numbers k such that (# squares) = (# nonsquares) in the quarter-squares representation of k.

Original entry on oeis.org

3, 7, 11, 13, 18, 21, 24, 27, 31, 34, 38, 43, 46, 51, 55, 57, 60, 66, 70, 73, 76, 83, 87, 91, 94, 99, 102, 106, 111, 114, 119, 123, 127, 133, 136, 141, 146, 150, 157, 160, 165, 171, 175, 181, 183, 186, 191, 198, 202, 208, 211, 214, 219, 227, 231, 237, 241
Offset: 1

Views

Author

Clark Kimberling, Apr 15 2015

Keywords

Comments

Every positive integer is a sum of at most four distinct quarter squares; see A257019. The sequences A257056, A257057, A257058 partition the nonnegative integers.

Examples

			Quarter-square representations:
r(0) = 0
r(1) = 1
r(2) = 2
r(3) = 2 + 1, so that a(1) = 3
		

Crossrefs

Programs

  • Mathematica
    z = 400; b[n_] := Floor[(n + 1)^2/4]; bb = Table[b[n], {n, 0, 100}];
    s[n_] := Table[b[n], {k, b[n + 1] - b[n]}];
    h[1] = {1}; h[n_] := Join[h[n - 1], s[n]];
    g = h[100]; r[0] = {0};
    r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]];
    u = Table[Length[r[n]], {n, 0, z}]  (* A257023 *)
    v = Table[Length[Intersection[r[n], Table[n^2, {n, 0, 1000}]]], {n, 0, z}]  (* A257024 *)
    -1 + Select[Range[0, z], 2 v[[#]] < u[[#]] &]   (* A257056 *)
    -1 + Select[Range[0, z], 2 v[[#]] == u[[#]] &]  (* A257057 *)
    -1 + Select[Range[0, z], 2 v[[#]] > u[[#]] &]   (* A257058 *)

A257058 Numbers k such that (# squares) > (# nonsquares) in the quarter-squares representation of k.

Original entry on oeis.org

0, 1, 4, 5, 9, 10, 16, 17, 19, 25, 26, 28, 29, 35, 36, 37, 39, 40, 41, 47, 49, 50, 52, 53, 54, 61, 64, 65, 67, 68, 69, 71, 77, 81, 82, 84, 85, 86, 88, 95, 100, 101, 103, 104, 105, 107, 109, 115, 120, 121, 122, 124, 125, 126, 128, 130, 131, 137, 142, 144, 145
Offset: 1

Views

Author

Clark Kimberling, Apr 15 2015

Keywords

Comments

Every positive integer is a sum of at most four distinct quarter squares; see A257019. The sequences A257056, A257057, A257058 partition the nonnegative integers.

Examples

			Quarter-square representations:
r(0) = 0, so a(1) = 0
r(1) = 1, so a(2) = 1
r(2) = 2
r(3) = 2 + 1
r(4) = 4, so a(3) = 4
		

Crossrefs

Programs

  • Mathematica
    z = 400; b[n_] := Floor[(n + 1)^2/4]; bb = Table[b[n], {n, 0, 100}];
    s[n_] := Table[b[n], {k, b[n + 1] - b[n]}];
    h[1] = {1}; h[n_] := Join[h[n - 1], s[n]];
    g = h[100]; r[0] = {0};
    r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, r[n - g[[n]]]]];
    u = Table[Length[r[n]], {n, 0, z}]  (* A257023 *)
    v = Table[Length[Intersection[r[n], Table[n^2, {n, 0, 1000}]]], {n, 0, z}]  (* A257024 *)
    -1 + Select[Range[0, z], 2 v[[#]] < u[[#]] &]   (* A257056 *)
    -1 + Select[Range[0, z], 2 v[[#]] == u[[#]] &]  (* A257057 *)
    -1 + Select[Range[0, z], 2 v[[#]] > u[[#]] &]   (* A257058 *)
Showing 1-4 of 4 results.