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.

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