OFFSET
1,3
COMMENTS
A composition of n is a finite sequence of positive integers summing to n. The k-th composition in standard order (row k of 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.
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 1..10000
EXAMPLE
The sequence together with the corresponding compositions begins:
0: () 33: (5,1) 70: (4,1,2)
1: (1) 34: (4,2) 72: (3,4)
2: (2) 37: (3,2,1) 76: (3,1,3)
4: (3) 38: (3,1,2) 77: (3,1,2,1)
5: (2,1) 40: (2,4) 80: (2,5)
6: (1,2) 41: (2,3,1) 81: (2,4,1)
8: (4) 44: (2,1,3) 82: (2,3,2)
9: (3,1) 45: (2,1,2,1) 88: (2,1,4)
12: (1,3) 48: (1,5) 89: (2,1,3,1)
13: (1,2,1) 49: (1,4,1) 96: (1,6)
16: (5) 50: (1,3,2) 97: (1,5,1)
17: (4,1) 52: (1,2,3) 98: (1,4,2)
18: (3,2) 54: (1,2,1,2) 101: (1,3,2,1)
20: (2,3) 64: (7) 102: (1,3,1,2)
22: (2,1,2) 65: (6,1) 104: (1,2,4)
24: (1,4) 66: (5,2) 105: (1,2,3,1)
25: (1,3,1) 68: (4,3) 108: (1,2,1,3)
32: (6) 69: (4,2,1) 109: (1,2,1,2,1)
MATHEMATICA
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], !MatchQ[stc[#], {___, x_, x_, ___}]&]
CROSSREFS
Anti-runs summing to n are counted by A003242(n).
A triangle counting maximal anti-runs of compositions is A106356.
Partitions whose first differences are an anti-run are A238424.
All of the following pertain to compositions in standard order (A066099):
- Adjacent equal pairs are counted by A124762.
- Weakly decreasing runs are counted by A124765.
- Weakly increasing runs are counted by A124766.
- Equal runs are counted by A124767.
- Strictly increasing runs are counted by A124768.
- Strictly decreasing runs are counted by A124769.
- Strict compositions are ranked by A233564.
- Constant compositions are ranked by A272919.
- Normal compositions are ranked by A333217.
- Anti-runs are counted by A333381.
- Adjacent unequal pairs are counted by A333382.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 28 2020
STATUS
approved