A329864 Number of compositions of n with the same runs-resistance as cuts-resistance.
1, 0, 0, 0, 0, 2, 5, 10, 17, 27, 68, 107, 217, 420, 884, 1761, 3679, 7469, 15437, 31396, 64369
Offset: 0
Examples
The a(5) = 2 through a(8) = 17 compositions: (1112) (1113) (1114) (1115) (2111) (1122) (1222) (1133) (2211) (2221) (3311) (3111) (4111) (5111) (11211) (11122) (11222) (11311) (11411) (21112) (12221) (22111) (21113) (111121) (22211) (121111) (31112) (111131) (111221) (112112) (112211) (122111) (131111) (211211) For example, the runs-resistance of (111221) is 3 because we have: (111221) -> (321) -> (111) -> (3), while the cuts-resistance is also 3 because we have: (111221) -> (112) -> (1) -> (), so (111221) is counted under a(8).
Links
- Claude Lenormand, Deux transformations sur les mots, Preprint, 5 pages, Nov 17 2003.
Crossrefs
Programs
-
Mathematica
runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1; degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1; Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],runsres[#]==degdep[#]&]],{n,0,10}]
Comments