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 A239016 #21 Aug 22 2021 00:15:33 %S A239016 0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,22,23,24,25,26,27,28, %T A239016 29,33,34,35,36,37,38,39,44,45,46,47,48,49,55,56,57,58,59,66,67,68,69, %U A239016 77,78,79,88,89,99,111,112,113,114,115,116,117,118,119,122,123,124,125,126,127,128,129,132 %N A239016 Numbers not larger than any rotation of their digits. %C A239016 The numbers with nonincreasing digits, A009994, form a subsequence which first differs at a(73)=132 (not in A009994) from this one. %C A239016 This sequence is a subsequence of A072544: numbers whose smallest decimal digit is also the initial digit. A072544(65)=121 is the first such number not in this sequence. %C A239016 This criterion involving "rotation" is part of the characterization of Lyndon words, see e.g. A102659, A102660, A210584, A210585. All of these are subsequences of this sequence. For example, A102659 = A213969 intersect A239016. %e A239016 The number 10 is excluded from this sequence because its "rotation" 01 is smaller than the number itself. %e A239016 The same is the case for any number whose first digit is not the smallest one: rotating a smaller digit to the front will always yield a smaller number, independently of the other digits. For this reason, all terms must be in A072544. %e A239016 a(73)=132 is in the sequence because the nontrivial rotations of its digits are 321 and 213, both larger than 132. %o A239016 (PARI) is_A239016(n)=vecsort(d=digits(n))==d||!for(i=1,#d-1,n>[1,10^(#d-i)]*divrem(n,10^i)&&return) %o A239016 (Python) %o A239016 def ok(n): %o A239016 s = str(n) %o A239016 if "".join(sorted(s)) == s: return True %o A239016 return all(n <= int(s[i:] + s[:i]) for i in range(1, len(s))) %o A239016 print(list(filter(ok, range(133)))) # _Michael S. Branicky_, Aug 21 2021 %K A239016 nonn,base %O A239016 1,3 %A A239016 _M. F. Hasler_, Mar 08 2014