This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A349154 #6 Nov 22 2021 19:59:40 %S A349154 0,12,160,193,195,198,204,216,240,2304,2561,2563,2566,2572,2584,2608, %T A349154 2656,2752,2944,3074,3077,3079,3082,3085,3087,3092,3097,3099,3102, %U A349154 3112,3121,3123,3126,3132,3152,3169,3171,3174,3180,3192,3232,3265,3267,3270,3276 %N A349154 Numbers k such that the k-th composition in standard order has sum equal to negative twice its alternating sum. %C A349154 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. %C A349154 The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. %e A349154 The terms and corresponding compositions begin: %e A349154 0: () %e A349154 12: (1,3) %e A349154 160: (2,6) %e A349154 193: (1,6,1) %e A349154 195: (1,5,1,1) %e A349154 198: (1,4,1,2) %e A349154 204: (1,3,1,3) %e A349154 216: (1,2,1,4) %e A349154 240: (1,1,1,5) %e A349154 2304: (3,9) %e A349154 2561: (2,9,1) %e A349154 2563: (2,8,1,1) %e A349154 2566: (2,7,1,2) %e A349154 2572: (2,6,1,3) %e A349154 2584: (2,5,1,4) %t A349154 ats[y_]:=Sum[(-1)^(i-1)*y[[i]],{i,Length[y]}]; %t A349154 stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; %t A349154 Select[Range[0,1000],Total[stc[#]]==-2*ats[stc[#]]&] %Y A349154 These compositions are counted by A224274 up to 0's. %Y A349154 Except for 0, a subset of A345919. %Y A349154 The positive version is A348614, reverse A349153. %Y A349154 An unordered version is A348617, counted by A001523. %Y A349154 The reverse version is A349155. %Y A349154 A positive unordered version is A349159, counted by A000712 up to 0's. %Y A349154 A000346 = even-length compositions with alt sum != 0, complement A001700. %Y A349154 A003242 counts Carlitz compositions. %Y A349154 A011782 counts compositions. %Y A349154 A025047 counts alternating or wiggly compositions, complement A345192. %Y A349154 A034871, A097805, and A345197 count compositions by alternating sum. %Y A349154 A103919 counts partitions by sum and alternating sum (reverse: A344612). %Y A349154 A116406 counts compositions with alternating sum >=0, ranked by A345913. %Y A349154 A138364 counts compositions with alternating sum 0, ranked by A344619. %Y A349154 Cf. A000070, A000984, A008549, A027306, A058622, A088218, A114121, A120452, A262977, A294175, A345917, A349160. %Y A349154 Statistics of standard compositions: %Y A349154 - The compositions themselves are the rows of A066099. %Y A349154 - Number of parts is given by A000120, distinct A334028. %Y A349154 - Sum and product of parts are given by A070939 and A124758. %Y A349154 - Maximum and minimum parts are given by A333766 and A333768. %Y A349154 Classes of standard compositions: %Y A349154 - Partitions and strict partitions are ranked by A114994 and A333256. %Y A349154 - Multisets and sets are ranked by A225620 and A333255. %Y A349154 - Strict and constant compositions are ranked by A233564 and A272919. %Y A349154 - Carlitz compositions are ranked by A333489, complement A348612. %Y A349154 - Necklaces are ranked by A065609, dual A333764, reversed A333943. %Y A349154 - Alternating compositions are ranked by A345167, complement A345168. %K A349154 nonn %O A349154 1,2 %A A349154 _Gus Wiseman_, Nov 21 2021