A330028 Number of compositions of n with cuts-resistance <= 2.
1, 1, 2, 3, 7, 13, 23, 45, 86, 159, 303, 568, 1069, 2005, 3769, 7066, 13251, 24821, 46482, 86988, 162758
Offset: 0
Examples
The a(0) = 1 through a(5) = 13 compositions: () (1) (2) (3) (4) (5) (1,1) (1,2) (1,3) (1,4) (2,1) (2,2) (2,3) (3,1) (3,2) (1,1,2) (4,1) (1,2,1) (1,1,3) (2,1,1) (1,2,2) (1,3,1) (2,1,2) (2,2,1) (3,1,1) (1,1,2,1) (1,2,1,1)
Crossrefs
Sum of first three columns of A329861.
Compositions with cuts-resistance 1 are A003242.
Compositions with cuts-resistance 2 are A329863.
Compositions with runs-resistance 2 are A329745.
Numbers whose binary expansion has cuts-resistance 2 are A329862.
Binary words with cuts-resistance 2 are A027383.
Cuts-resistance of binary expansion is A319416.
Programs
-
Mathematica
degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1; Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],degdep[#]<=2&]],{n,0,10}]
Comments