A255973 Trace of the minimal alternating Fibonacci representation of n.
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
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
Links
- Clark Kimberling, Table of n, a(n) for n = 0..1000
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[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 *)
Comments