A333218 Numbers k such that the k-th composition in standard order is a permutation (of an initial interval).
0, 1, 5, 6, 37, 38, 41, 44, 50, 52, 549, 550, 553, 556, 562, 564, 581, 582, 593, 600, 610, 616, 649, 652, 657, 664, 708, 712, 786, 788, 802, 808, 836, 840, 16933, 16934, 16937, 16940, 16946, 16948, 16965, 16966, 16977, 16984, 16994, 17000, 17033, 17036, 17041
Offset: 1
Keywords
Examples
The sequence of terms together with their corresponding compositions begins: 0: () 593: (3,2,4,1) 16937: (5,4,2,3,1) 1: (1) 600: (3,2,1,4) 16940: (5,4,2,1,3) 5: (2,1) 610: (3,1,4,2) 16946: (5,4,1,3,2) 6: (1,2) 616: (3,1,2,4) 16948: (5,4,1,2,3) 37: (3,2,1) 649: (2,4,3,1) 16965: (5,3,4,2,1) 38: (3,1,2) 652: (2,4,1,3) 16966: (5,3,4,1,2) 41: (2,3,1) 657: (2,3,4,1) 16977: (5,3,2,4,1) 44: (2,1,3) 664: (2,3,1,4) 16984: (5,3,2,1,4) 50: (1,3,2) 708: (2,1,4,3) 16994: (5,3,1,4,2) 52: (1,2,3) 712: (2,1,3,4) 17000: (5,3,1,2,4) 549: (4,3,2,1) 786: (1,4,3,2) 17033: (5,2,4,3,1) 550: (4,3,1,2) 788: (1,4,2,3) 17036: (5,2,4,1,3) 553: (4,2,3,1) 802: (1,3,4,2) 17041: (5,2,3,4,1) 556: (4,2,1,3) 808: (1,3,2,4) 17048: (5,2,3,1,4) 562: (4,1,3,2) 836: (1,2,4,3) 17092: (5,2,1,4,3) 564: (4,1,2,3) 840: (1,2,3,4) 17096: (5,2,1,3,4) 581: (3,4,2,1) 16933: (5,4,3,2,1) 17170: (5,1,4,3,2) 582: (3,4,1,2) 16934: (5,4,3,1,2) 17172: (5,1,4,2,3)
Crossrefs
Programs
-
Mathematica
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; Select[Range[0,1000],#==0||UnsameQ@@stc[#]&&Max@@stc[#]==Length[stc[#]]&]
Comments