OFFSET
1,2
COMMENTS
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.
If a collapse is an adding together of some partial run of an integer composition c, we say c is collapsible iff by some sequence of collapses it can be reduced to a single part. An example of such a sequence of collapses is (11132112) -> (332112) -> (33222) -> (6222) -> (66) -> (n), which shows that (11132112) is a collapsible composition of 12.
EXAMPLE
The terms together with their corresponding compositions begin:
1:(1) 2:(2) 4:(3) 8:(4) 16:(5) 32:(6)
3:(11) 7:(111) 10:(22) 31:(11111) 36:(33)
11:(211) 39:(3111)
14:(112) 42:(222)
15:(1111) 43:(2211)
46:(2112)
47:(21111)
58:(1122)
59:(11211)
60:(1113)
62:(11112)
63:(111111)
MATHEMATICA
repcams[q_List]:=repcams[q]=Union[{q}, If[UnsameQ@@q, {}, Union@@repcams/@Union[Insert[Drop[q, #], Plus@@Take[q, #], First[#]]&/@Select[Tuples[Range[Length[q]], 2], And[Less@@#, SameQ@@Take[q, #]]&]]]];
stc[n_]:=Differences[Prepend[Join@@ Position[Reverse[IntegerDigits[n, 2]], 1], 0]]//Reverse;
Select[Range[0, 100], MemberQ[repcams[stc[#]], {_}]&]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 23 2022
STATUS
approved