A358135 Difference of first and last parts of the n-th composition in standard order.
0, 0, 0, 0, -1, 1, 0, 0, -2, 0, -1, 2, 0, 1, 0, 0, -3, -1, -2, 1, -1, 0, -1, 3, 0, 1, 0, 2, 0, 1, 0, 0, -4, -2, -3, 0, -2, -1, -2, 2, -1, 0, -1, 1, -1, 0, -1, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 0, -5, -3, -4, -1, -3, -2, -3, 1, -2, -1, -2, 0, -2
Offset: 1
Keywords
Links
Crossrefs
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; Table[-First[stc[n]]+Last[stc[n]],{n,1,100}]
Comments