|
|
A348614
|
|
Numbers k such that the k-th composition in standard order has sum equal to twice its alternating sum.
|
|
12
|
|
|
0, 9, 11, 14, 130, 133, 135, 138, 141, 143, 148, 153, 155, 158, 168, 177, 179, 182, 188, 208, 225, 227, 230, 236, 248, 2052, 2057, 2059, 2062, 2066, 2069, 2071, 2074, 2077, 2079, 2084, 2089, 2091, 2094, 2098, 2101, 2103, 2106, 2109, 2111, 2120, 2129, 2131
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
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.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i.
|
|
LINKS
|
|
|
EXAMPLE
|
The terms together with their binary indices begin:
0: ()
9: (3,1)
11: (2,1,1)
14: (1,1,2)
130: (6,2)
133: (5,2,1)
135: (5,1,1,1)
138: (4,2,2)
141: (4,1,2,1)
143: (4,1,1,1,1)
148: (3,2,3)
153: (3,1,3,1)
155: (3,1,2,1,1)
158: (3,1,1,1,2)
|
|
MATHEMATICA
|
ats[y_]:=Sum[(-1)^(i-1)*y[[i]], {i, Length[y]}];
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 1000], Total[stc[#]]==2*ats[stc[#]]&]
|
|
CROSSREFS
|
The unordered case (partitions) is counted by A000712, reverse A006330.
These compositions are counted by A262977.
Except for 0, a subset of A345917 (which is itself a subset of A345913).
A000346 = even-length compositions with alt sum != 0, complement A001700.
A034871 counts compositions of 2n with alternating sum 2k.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A116406 counts compositions with alternating sum >=0, ranked by A345913.
A138364 counts compositions with alternating sum 0, ranked by A344619.
A345197 counts compositions by length and alternating sum.
Cf. A008549, A013777, A027306, A058622, A088218, A114121, A120452, A126869, A163493, A294175, A344604.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|