OFFSET
1,2
COMMENTS
We define the skew-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A - B - C + D + E - F - G + ....
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.
LINKS
EXAMPLE
The sequence together with the corresponding compositions begins:
0: ()
3: (1,1)
10: (2,2)
14: (1,1,2)
15: (1,1,1,1)
36: (3,3)
43: (2,2,1,1)
44: (2,1,3)
45: (2,1,2,1)
52: (1,2,3)
54: (1,2,1,2)
58: (1,1,2,2)
59: (1,1,2,1,1)
61: (1,1,1,2,1)
63: (1,1,1,1,1,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]), {i, Length[f]}];
Select[Range[0, 100], skats[Reverse[stc[#]]]==0&]
CROSSREFS
See link for sequences related to standard compositions.
The alternating form is A344619.
The non-reverse version is A357627.
The version for prime indices is A357632.
The version for Heinz numbers of partitions is A357636.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 08 2022
STATUS
approved