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.

A256655 R(k), the minimal alternating Fibonacci representation of k, concatenated for k = 0, 1, 2,....

Original entry on oeis.org

0, 1, 2, 3, 5, -1, 5, 8, -2, 8, -1, 8, 13, -5, 1, 13, -3, 13, -2, 13, -1, 13, 21, -8, 1, 21, -8, 2, 21, -5, 21, -5, 1, 21, -3, 21, -2, 21, -1, 21, 34, -13, 1, 34, -13, 2, 34, -13, 3, 34, -13, 5, -1, 34, -8, 34, -8, 1, 34, -8, 2, 34, -5, 34, -5, 1, 34, -3, 34
Offset: 0

Views

Author

Clark Kimberling, Apr 08 2015

Keywords

Comments

Suppose that b = (b(0), b(1), ... ) is an increasing sequence of positive integers satisfying b(0) = 1 and b(n+1) <= 2*b(n) for n >= 0. Let B(n) be the least b(m) >= n. Let R(0) = 1, and for n > 0, let R(n) = B(n) - R(B(n) - n). The resulting sum of the form R(n) = B(n) - B(m(1)) + B(m(2)) - ... + ((-1)^k)*B(k) is introduced here as the minimal alternating b-representation of n. The sum B(n) + B(m(2)) + ... we call the positive part of R(n), and the sum B(m(1)) + B(m(3)) + ... , the nonpositive part of R(n). The number ((-1)^k)*B(k) is the trace of n.
If b(n) = F(n+2), where F = A000045, then the sum is the minimal alternating Fibonacci-representation of n.

Examples

			R(0) = 0
R(1) = 1
R(2) = 2
R(3) = 3
R(4) = 5 - 1
R(9) = 13 - 5 + 1
R(25) = 34 - 13 + 5 - 1
R(64) = 89 - 34 + 13 - 5 + 1
		

Crossrefs

Cf. A000045, A255973 (trace), A256656 (numbers with positive trace), A256657 (numbers with nonpositive trace), A256663 (positive part of R(n)), A256664 (nonpositive part of R(n)), A256654, A256696 (minimal alternating binary representations), A255974 (minimal alternating triangular-number representations), A256789 (minimal alternating squares representations).

Programs

  • Mathematica
    f[n_] = Fibonacci[n]; ff = Table[f[n], {n, 1, 70}];
    s[n_] := Table[f[n + 2], {k, 1, f[n]}];
    h[0] = {1}; h[n_] := Join[h[n - 1], s[n]];
    g = h[12]; r[0] = {0};
    r[n_] := If[MemberQ[ff, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]];
    Flatten[Table[r[n], {n, 0, 60}]]

Formula

R(F(k)^2) = F(2k-1) - F(2k-3) + F(2k-5) - ... + d*F(5) + (-1)^k, where d = (-1)^(k+1).

A256663 Nonnegative part of the minimal alternating Fibonacci representation of n.

Original entry on oeis.org

0, 1, 2, 3, 5, 5, 8, 8, 8, 14, 13, 13, 13, 13, 22, 23, 21, 22, 21, 21, 21, 21, 35, 36, 37, 39, 34, 35, 36, 34, 35, 34, 34, 34, 34, 56, 57, 58, 60, 60, 63, 63, 55, 56, 57, 58, 60, 55, 56, 57, 55, 56, 55, 55, 55, 55, 90, 91, 92, 94, 94, 97, 97, 97, 103, 102
Offset: 0

Views

Author

Clark Kimberling, Apr 08 2015

Keywords

Comments

See A256655 for definitions.

Examples

			R(9) = 13 - 5 + 1, so that a(9) = 13 + 1 = 14.
		

Crossrefs

Programs

  • Mathematica
    b[n_] = Fibonacci[n]; bb = Table[b[n], {n, 1, 70}];
    h[0] = {1}; h[n_] := Join[h[n - 1], Table[b[n + 2], {k, 1, b[n]}]];
    g = h[23];
    r[0] = {0}; r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]];
    Table[Total[Abs[r[n]]], {n, 0, 100}] (* A256662 *)
    Table[Total[(Abs[r[n]] + r[n])/2], {n, 0, 100}]  (* A256663 *)
    Table[Total[(Abs[r[n]] - r[n])/2], {n, 0, 100}]  (* A256664 *)

Formula

A256663(n) - A256664(n) = n.

A256662 Sum of absolute values of terms in the minimal alternating Fibonacci representation of n.

Original entry on oeis.org

0, 1, 2, 3, 6, 5, 10, 9, 8, 19, 16, 15, 14, 13, 30, 31, 26, 27, 24, 23, 22, 21, 48, 49, 50, 53, 42, 43, 44, 39, 40, 37, 36, 35, 34, 77, 78, 79, 82, 81, 86, 85, 68, 69, 70, 71, 74, 63, 64, 65, 60, 61, 58, 57, 56, 55, 124, 125, 126, 129, 128, 133, 132, 131
Offset: 0

Views

Author

Clark Kimberling, Apr 08 2015

Keywords

Comments

The terms are distinct. See A256655 for definitions.

Examples

			Minimal alternating Fibonacci representations:
R(0) = 0
R(1) = 1
R(2) = 2
R(3) = 3
R(4) = 5 - 1, so that a(4) = 6.
R(9) = 13 - 5 + 1, so that a(9) = 19.
		

Crossrefs

Programs

  • Mathematica
    b[n_] = Fibonacci[n]; bb = Table[b[n], {n, 1, 70}];
    h[0] = {1}; h[n_] := Join[h[n - 1], Table[b[n + 2], {k, 1, b[n]}]];
    g = h[23];  r[0] = {0};
    r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]];
    Table[Total[Abs[r[n]]], {n, 0, 100}] (* A256662 *)
    Table[Total[(Abs[r[n]] + r[n])/2], {n, 0, 100}]  (* A256663 *)
    Table[Total[(Abs[r[n]] - r[n])/2], {n, 0, 100}]  (* A256664 *)

A255973 Trace of the minimal alternating Fibonacci representation of n.

Original entry on oeis.org

0, 1, 2, 3, -1, 5, -2, -1, 8, 1, -3, -2, -1, 13, 1, 2, -5, 1, -3, -2, -1, 21, 1, 2, 3, -1, -8, 1, 2, -5, 1, -3, -2, -1, 34, 1, 2, 3, -1, 5, -2, -1, -13, 1, 2, 3, -1, -8, 1, 2, -5, 1, -3, -2, -1, 55, 1, 2, 3, -1, 5, -2, -1, 8, 1, -3, -2, -1, -21, 1, 2, 3, -1
Offset: 0

Views

Author

Clark Kimberling, Apr 08 2015

Keywords

Comments

See A256655 for definitions.

Examples

			Let R(k) be the minimal alternating Fibonacci representation of k.  The trace of R(k) is the last term.
R(1) = 1, trace = 1
R(2) = 2, trace = 2
R(3) = 3, trace = 3
R(4) = 5 - 1, trace = -1
R(5) = 5, trace = 5
R(6) = 6 - 2, trace = -2
		

Crossrefs

Cf. A000045, A256655 (representations R(n)), A256656 (numbers with positive trace), A256657 (numbers with nonpositive trace), A256663 (positive part of R(n)), A256664 (nonpositive part of R(n)), A256654.

Programs

  • Mathematica
    b[n_] = Fibonacci[n]; bb = Table[b[n], {n, 1, 70}];
    h[0] = {1}; h[n_] := Join[h[n - 1], Table[b[n + 2], {k, 1, b[n]}]];
    g = h[12];  r[0] = {0};
    r[n_] := If[MemberQ[bb, n], {n}, Join[{g[[n]]}, -r[g[[n]] - n]]];
    Table[Last[r[n]], {n, 0, 200}]  (* A255973 *)
Showing 1-4 of 4 results.