login
The a(n)-th composition in standard order (A066099) has alternating sum 0.
51

%I #7 Jun 08 2021 07:26:47

%S 0,3,10,13,15,36,41,43,46,50,53,55,58,61,63,136,145,147,150,156,162,

%T 165,167,170,173,175,180,185,187,190,196,201,203,206,210,213,215,218,

%U 221,223,228,233,235,238,242,245,247,250,253,255,528,545,547,550,556,568

%N The a(n)-th composition in standard order (A066099) has alternating sum 0.

%C The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.

%C 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.

%e The sequence of terms together with the corresponding compositions begins:

%e 0: ()

%e 3: (1,1)

%e 10: (2,2)

%e 13: (1,2,1)

%e 15: (1,1,1,1)

%e 36: (3,3)

%e 41: (2,3,1)

%e 43: (2,2,1,1)

%e 46: (2,1,1,2)

%e 50: (1,3,2)

%e 53: (1,2,2,1)

%e 55: (1,2,1,1,1)

%e 58: (1,1,2,2)

%e 61: (1,1,1,2,1)

%e 63: (1,1,1,1,1,1)

%e 136: (4,4)

%e 145: (3,4,1)

%e 147: (3,3,1,1)

%e 150: (3,2,1,2)

%e 156: (3,1,1,3)

%t ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}];

%t stc[n_]:=Reverse[Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]]

%t Select[Range[0,100],ats[stc[#]]==0&]

%Y The version for Heinz numbers of partitions is A000290, counted by A000041.

%Y These are the positions of zeros in A344618.

%Y A103919 counts partitions by sum and alternating sum (reverse: A344612).

%Y A116406 counts compositions with alternating sum >= 0.

%Y A124754 gives the alternating sum of standard compositions.

%Y A316524 is the alternating sum of the prime indices of n.

%Y A344604 counts wiggly compositions with twins.

%Y A344610 counts partitions by sum and positive reverse-alternating sum.

%Y A344611 counts partitions of 2n with reverse-alternating sum >= 0.

%Y A344616 gives the alternating sum of reversed prime indices.

%Y All of the following pertain to compositions in standard order:

%Y - The length is A000120.

%Y - Converting to reversed ranking gives A059893.

%Y - The rows are A066099.

%Y - The sum is A070939.

%Y - The runs are counted by A124767.

%Y - The reversed version is A228351.

%Y - Strict compositions are ranked by A233564.

%Y - Constant compositions are ranked by A272919.

%Y - The Heinz number is A333219.

%Y - Anti-run compositions are ranked by A333489.

%Y Cf. A000070, A000097, A003242, A006330, A028260, A119899, A239830, A344605, A344607, A344650, A344739.

%K nonn

%O 1,2

%A _Gus Wiseman_, Jun 03 2021