This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A334274 #7 Apr 28 2020 00:14:50 %S A334274 0,1,2,3,4,6,7,8,10,12,14,15,16,20,24,26,28,30,31,32,36,40,42,48,52, %T A334274 54,56,58,60,62,63,64,72,80,84,96,100,104,106,108,112,116,118,120,122, %U A334274 124,126,127,128,136,144,160,164,168,170,192,200,204,208,212,216 %N A334274 Numbers k such that the k-th composition in standard order is both a necklace and a reversed co-necklace. %C A334274 Also numbers whose binary expansion is both a reversed necklace and a co-necklace. %C A334274 A necklace is a finite sequence of positive integers that is lexicographically less than or equal to any cyclic rotation. Co-necklaces are defined similarly, except with greater instead of less. %C A334274 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. %e A334274 The sequence of all reversed co-necklace necklaces begins: %e A334274 0: () 31: (1,1,1,1,1) 100: (1,3,3) %e A334274 1: (1) 32: (6) 104: (1,2,4) %e A334274 2: (2) 36: (3,3) 106: (1,2,2,2) %e A334274 3: (1,1) 40: (2,4) 108: (1,2,1,3) %e A334274 4: (3) 42: (2,2,2) 112: (1,1,5) %e A334274 6: (1,2) 48: (1,5) 116: (1,1,2,3) %e A334274 7: (1,1,1) 52: (1,2,3) 118: (1,1,2,1,2) %e A334274 8: (4) 54: (1,2,1,2) 120: (1,1,1,4) %e A334274 10: (2,2) 56: (1,1,4) 122: (1,1,1,2,2) %e A334274 12: (1,3) 58: (1,1,2,2) 124: (1,1,1,1,3) %e A334274 14: (1,1,2) 60: (1,1,1,3) 126: (1,1,1,1,1,2) %e A334274 15: (1,1,1,1) 62: (1,1,1,1,2) 127: (1,1,1,1,1,1,1) %e A334274 16: (5) 63: (1,1,1,1,1,1) 128: (8) %e A334274 20: (2,3) 64: (7) 136: (4,4) %e A334274 24: (1,4) 72: (3,4) 144: (3,5) %e A334274 26: (1,2,2) 80: (2,5) 160: (2,6) %e A334274 28: (1,1,3) 84: (2,2,3) 164: (2,3,3) %e A334274 30: (1,1,1,2) 96: (1,6) 168: (2,2,4) %t A334274 stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse; %t A334274 neckQ[q_]:=Length[q]==0||Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And]; %t A334274 coneckQ[q_]:=Length[q]==0||Array[OrderedQ[{RotateRight[q,#],q}]&,Length[q]-1,1,And]; %t A334274 Select[Range[0,100],neckQ[stc[#]]&&coneckQ[Reverse[stc[#]]]&] %Y A334274 The aperiodic case is A334267. %Y A334274 Compositions of this type are counted by A334271. %Y A334274 Normal sequences of this type are counted by A334272. %Y A334274 Binary (or reversed binary) necklaces are counted by A000031. %Y A334274 Necklace compositions are counted by A008965. %Y A334274 All of the following pertain to compositions in standard order (A066099): %Y A334274 - Necklaces are A065609. %Y A334274 - Reversed necklaces are A333943. %Y A334274 - Co-necklaces are A333764. %Y A334274 - Reversed co-necklaces are A328595. %Y A334274 - Lyndon words are A275692. %Y A334274 - Co-Lyndon words are A326774. %Y A334274 - Reversed Lyndon words are A334265. %Y A334274 - Reversed co-Lyndon words are A328596. %Y A334274 - Aperiodic compositions are A328594. %Y A334274 Cf. A019536, A034691, A059966, A060223, A329138, A334266, A334269, A334270. %K A334274 nonn %O A334274 1,3 %A A334274 _Gus Wiseman_, Apr 25 2020