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 A275692 #27 Nov 26 2022 16:14:47 %S A275692 0,1,2,4,6,8,12,14,16,20,24,26,28,30,32,40,48,50,52,56,58,60,62,64,72, %T A275692 80,84,96,98,100,104,106,108,112,114,116,118,120,122,124,126,128,144, %U A275692 160,164,168,192,194,196,200,202,208,210,212,216,218,224,226,228 %N A275692 Numbers k such that every rotation of the binary digits of k is less than k. %C A275692 0, and terms of A065609 that are not in A121016. %C A275692 Number of terms with d binary digits is A001037(d). %C A275692 Take the binary representation of a(n), reverse it, add 1 to each digit. The result is the decimal representation of A102659(n). %C A275692 From _Gus Wiseman_, Apr 19 2020: (Start) %C A275692 Also numbers k such that the k-th composition in standard order (row k of A066099) is a Lyndon word. For example, the sequence of all Lyndon words begins: %C A275692 0: () 52: (1,2,3) 118: (1,1,2,1,2) %C A275692 1: (1) 56: (1,1,4) 120: (1,1,1,4) %C A275692 2: (2) 58: (1,1,2,2) 122: (1,1,1,2,2) %C A275692 4: (3) 60: (1,1,1,3) 124: (1,1,1,1,3) %C A275692 6: (1,2) 62: (1,1,1,1,2) 126: (1,1,1,1,1,2) %C A275692 8: (4) 64: (7) 128: (8) %C A275692 12: (1,3) 72: (3,4) 144: (3,5) %C A275692 14: (1,1,2) 80: (2,5) 160: (2,6) %C A275692 16: (5) 84: (2,2,3) 164: (2,3,3) %C A275692 20: (2,3) 96: (1,6) 168: (2,2,4) %C A275692 24: (1,4) 98: (1,4,2) 192: (1,7) %C A275692 26: (1,2,2) 100: (1,3,3) 194: (1,5,2) %C A275692 28: (1,1,3) 104: (1,2,4) 196: (1,4,3) %C A275692 30: (1,1,1,2) 106: (1,2,2,2) 200: (1,3,4) %C A275692 32: (6) 108: (1,2,1,3) 202: (1,3,2,2) %C A275692 40: (2,4) 112: (1,1,5) 208: (1,2,5) %C A275692 48: (1,5) 114: (1,1,3,2) 210: (1,2,3,2) %C A275692 50: (1,3,2) 116: (1,1,2,3) 212: (1,2,2,3) %C A275692 (End) %H A275692 Robert Israel, <a href="/A275692/b275692.txt">Table of n, a(n) for n = 1..9868</a> %e A275692 6 is in the sequence because its binary representation 110 is greater than all the rotations 011 and 101. %e A275692 10 is not in the sequence because its binary representation 1010 is unchanged under rotation by 2 places. %e A275692 From _Gus Wiseman_, Oct 31 2019: (Start) %e A275692 The sequence of terms together with their binary expansions and binary indices begins: %e A275692 1: 1 ~ {1} %e A275692 2: 10 ~ {2} %e A275692 4: 100 ~ {3} %e A275692 6: 110 ~ {2,3} %e A275692 8: 1000 ~ {4} %e A275692 12: 1100 ~ {3,4} %e A275692 14: 1110 ~ {2,3,4} %e A275692 16: 10000 ~ {5} %e A275692 20: 10100 ~ {3,5} %e A275692 24: 11000 ~ {4,5} %e A275692 26: 11010 ~ {2,4,5} %e A275692 28: 11100 ~ {3,4,5} %e A275692 30: 11110 ~ {2,3,4,5} %e A275692 32: 100000 ~ {6} %e A275692 40: 101000 ~ {4,6} %e A275692 48: 110000 ~ {5,6} %e A275692 50: 110010 ~ {2,5,6} %e A275692 52: 110100 ~ {3,5,6} %e A275692 56: 111000 ~ {4,5,6} %e A275692 58: 111010 ~ {2,4,5,6} %e A275692 (End) %p A275692 filter:= proc(n) local L, k; %p A275692 L:= convert(convert(n,binary),string); %p A275692 for k from 1 to length(L)-1 do %p A275692 if lexorder(L,StringTools:-Rotate(L,k)) then return false fi; %p A275692 od; %p A275692 true %p A275692 end proc: %p A275692 select(filter, [$0..1000]); %t A275692 filterQ[n_] := Module[{bits, rr}, bits = IntegerDigits[n, 2]; rr = NestList[RotateRight, bits, Length[bits]-1] // Rest; AllTrue[rr, FromDigits[#, 2] < n&]]; %t A275692 Select[Range[0, 1000], filterQ] (* _Jean-François Alcover_, Apr 29 2019 *) %o A275692 (Python) %o A275692 def ok(n): %o A275692 b = bin(n)[2:] %o A275692 return all(b[i:] + b[:i] < b for i in range(1, len(b))) %o A275692 print([k for k in range(230) if ok(k)]) # _Michael S. Branicky_, May 26 2022 %Y A275692 A similar concept is A328596. %Y A275692 Numbers whose binary expansion is aperiodic are A328594. %Y A275692 Numbers whose reversed binary expansion is a necklace are A328595. %Y A275692 Binary necklaces are A000031. %Y A275692 Binary Lyndon words are A001037. %Y A275692 Lyndon compositions are A059966. %Y A275692 Length of Lyndon factorization of binary expansion is A211100. %Y A275692 Length of co-Lyndon factorization of binary expansion is A329312. %Y A275692 Length of Lyndon factorization of reversed binary expansion is A329313. %Y A275692 Length of co-Lyndon factorization of reversed binary expansion is A329326. %Y A275692 Cf. A000031, A000740, A008965, A027375, A102659, A121016. %Y A275692 All of the following pertain to compositions in standard order (A066099): %Y A275692 - Length is A000120. %Y A275692 - Necklaces are A065609. %Y A275692 - Sum is A070939. %Y A275692 - Rotational symmetries are counted by A138904. %Y A275692 - Strict compositions are A233564. %Y A275692 - Constant compositions are A272919. %Y A275692 - Lyndon compositions are A275692 (this sequence). %Y A275692 - Co-Lyndon compositions are A326774. %Y A275692 - Rotational period is A333632. %Y A275692 - Co-necklaces are A333764. %Y A275692 - Co-Lyndon factorizations are counted by A333765. %Y A275692 - Lyndon factorizations are counted by A333940. %Y A275692 - Reversed necklaces are A333943. %Y A275692 Cf. A034691, A060223, A124767, A269134, A292884. %K A275692 nonn %O A275692 1,3 %A A275692 _Robert Israel_, Aug 05 2016