A357706 Numbers k such that the k-th composition in standard order has half-alternating sum and skew-alternating sum both 0.
0, 15, 45, 54, 59, 153, 170, 179, 204, 213, 230, 235, 247, 255, 561, 594, 611, 660, 677, 710, 715, 727, 735, 750, 765, 792, 809, 842, 851, 871, 879, 894, 908, 917, 934, 939, 951, 959, 973, 982, 987, 1005, 1014, 1019
Offset: 1
Keywords
Crossrefs
These compositions are counted by A228248.
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}]; skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}]; Select[Range[0,1000],halfats[stc[#]]==0&&skats[stc[#]]==0&]
Comments