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-12 of 12 results.

A256797 Nonpositive part of the minimal alternating squares representation of n.

Original entry on oeis.org

0, 2, 1, 0, 4, 4, 4, 1, 0, 10, 9, 4, 4, 4, 1, 0, 9, 11, 10, 9, 4, 4, 4, 1, 0, 20, 9, 9, 11, 10, 9, 4, 4, 4, 1, 0, 16, 20, 20, 9, 9, 11, 10, 9, 4, 4, 4, 1, 0, 18, 17, 16, 20, 20, 9, 9, 11, 10, 9, 4, 4, 4, 1, 0, 16, 16, 18, 17, 16, 20, 20, 9, 9, 11, 10, 9, 4
Offset: 1

Views

Author

Clark Kimberling, Apr 13 2015

Keywords

Comments

See A256789 for definitions.

Examples

			R(1) = 1, positive part 1, nonpositive part 0;
R(2) = 4 - 2, positive part 4, nonpositive part 2;
R(3) = 4 - 1, positive part 4, nonpositive part 1;
R(89) = 100 - 16 + 9 - 4, positive part 100 + 9 = 109, nonpositive part 16 + 4 = 20.
		

Crossrefs

Programs

  • Mathematica
    b[n_] := n^2; bb = Table[b[n], {n, 0, 100}];
    s[n_] := Table[b[n], {k, 1, 2 n - 1}];
    h[1] = {1}; h[n_] := Join[h[n - 1], s[n]];
    g = h[100]; r[0] = {0}; r[1] = {1}; r[2] = {4, -2};
    r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]];
    t = Table[r[n], {n, 1, z}] (* A256789 *)
    Table[Total[(Abs[r[n]] + r[n])/2], {n, 1, 120}]  (* A256796 *)
    Table[Total[(Abs[r[n]] - r[n])/2], {n, 1, 120}]  (* A256797 *)

A256798 Numbers whose minimal alternating squares representation has trace 2 or -2.

Original entry on oeis.org

2, 7, 14, 18, 23, 29, 34, 42, 47, 50, 57, 62, 67, 74, 79, 82, 86, 93, 98, 103, 107, 114, 119, 126, 130, 137, 142, 146, 151, 155, 162, 167, 173, 178, 182, 189, 194, 202, 207, 211, 218, 223, 227, 233, 238, 242, 249, 254, 260, 266, 271, 275, 282, 287, 290, 295
Offset: 1

Views

Author

Clark Kimberling, Apr 13 2015

Keywords

Comments

The trace of all other positive integers is h^2 or -h^2 for some integer h. (See A256789 for definitions and A256791 for traces.)

Examples

			Trace(n) = 2 for n = 7, 14, 23, 34, 47, 62, ..
Trace(n) = -2 for n = 2, 18, 29, 42, 50, 57, 67, ...
Together in increasing order:  2, 7, 14, 18, 23, 29, 34, 42, ...
		

Crossrefs

Programs

  • Mathematica
    b[n_] := n^2; bb = Table[b[n], {n, 0, 1000}];
    s[n_] := Table[b[n], {k, 1, 2 n - 1}];
    h[1] = {1}; h[n_] := Join[h[n - 1], s[n]];
    g = h[100]; r[0] = {0}; r[1] = {1}; r[2] = {4, -2};
    r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]];
    Table[r[n], {n, 0, 120}]  (* A256789 *)
    u = Flatten[Table[Last[r[n]], {n, 1, 1000}]]; (* A256791 *)
    Select[Range[800], Abs[u[[#]]] == 2 &] (* A256798 *)
Previous Showing 11-12 of 12 results.