A357626 Numbers k such that the reversed k-th composition in standard order has half-alternating sum 0.
0, 11, 15, 37, 38, 45, 46, 53, 54, 55, 59, 137, 138, 140, 153, 154, 156, 167, 169, 170, 171, 172, 179, 191, 201, 202, 204, 205, 206, 213, 214, 229, 230, 231, 235, 243, 247, 251, 255, 529, 530, 532, 536, 561, 562, 564, 568, 583, 587, 593, 594, 595, 596, 600
Offset: 1
Keywords
Examples
The sequence together with the corresponding compositions begins: 0: () 11: (2,1,1) 15: (1,1,1,1) 37: (3,2,1) 38: (3,1,2) 45: (2,1,2,1) 46: (2,1,1,2) 53: (1,2,2,1) 54: (1,2,1,2) 55: (1,2,1,1,1) 59: (1,1,2,1,1)
Links
Crossrefs
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]}]; Select[Range[0,100],halfats[Reverse[stc[#]]]==0&]
Comments