OFFSET
0,3
COMMENTS
The standard order of compositions is given by A066099.
The sum of row n is 2^{n-1} for n>0.
LINKS
Alois P. Heinz, Rows n = 0..14, flattened
FORMULA
For a composition b(1),...,b(k), a(n) = Sum_{i=1}^k (-1)^{i-1} b(i).
a(2^k) = k+1. If n = 2^e_1 + 2^e_2 + k, 0 <= k < 2^e_2 < 2^e_1, then a(n) = (e_1 - e_2) - a(2^e_2 + k).
a(0) = 0; for n>0, a(n) = a(floor(n/2)) - A106400(n).
EXAMPLE
Composition number 11 is 2,1,1; 2-1+1 = 2, so a(11) = 2.
The table starts:
0
1
2 0
3 1 -1 1
CROSSREFS
KEYWORD
easy,sign,tabf
AUTHOR
Franklin T. Adams-Watters, Nov 06 2006
STATUS
approved