OFFSET
0,3
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.
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..1000
FORMULA
R(F(k)^2) = F(2k-1) - F(2k-3) + F(2k-5) - ... + d*F(5) + (-1)^k, where d = (-1)^(k+1).
EXAMPLE
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
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}]]
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).
KEYWORD
easy,sign
AUTHOR
Clark Kimberling, Apr 08 2015
STATUS
approved