A349057 Numbers k such that the k-th composition in standard order is not weakly alternating.
37, 46, 52, 53, 69, 75, 78, 92, 93, 101, 104, 105, 107, 110, 116, 117, 133, 137, 139, 142, 150, 151, 156, 157, 165, 174, 180, 181, 184, 185, 186, 187, 190, 197, 200, 201, 203, 206, 208, 209, 210, 211, 214, 215, 220, 221, 229, 232, 233, 235, 238, 244, 245, 261
Offset: 1
Keywords
Examples
The terms and corresponding compositions begin: 37: (3,2,1) 46: (2,1,1,2) 52: (1,2,3) 53: (1,2,2,1) 69: (4,2,1) 75: (3,2,1,1) 78: (3,1,1,2) 92: (2,1,1,3) 93: (2,1,1,2,1) 101: (1,3,2,1) 104: (1,2,4) 105: (1,2,3,1) 107: (1,2,2,1,1) 110: (1,2,1,1,2) 116: (1,1,2,3) 117: (1,1,2,2,1)
Crossrefs
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join@@Position[ Reverse[IntegerDigits[n,2]],1],0]]//Reverse; whkQ[y_]:=And@@Table[If[EvenQ[m], y[[m]]<=y[[m+1]],y[[m]]>=y[[m+1]]],{m,1,Length[y]-1}]; Select[Range[0,100],!whkQ[stc[#]]&&!whkQ[-stc[#]]&]
Comments