A366195 Integers whose binary expansion has the property that there exists a length-k substring of bits in the expansion that is strictly lexicographically later than the first k bits.
11, 19, 22, 23, 35, 37, 38, 39, 43, 44, 45, 46, 47, 55, 67, 69, 70, 71, 74, 75, 76, 77, 78, 79, 83, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 103, 110, 111, 131, 133, 134, 135, 137, 138, 139, 140, 141, 142, 143, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156
Offset: 1
Examples
The binary expansion of a(3) = 22 is 10110, which has a length-2 substring ("11") which is strictly lexicographically later than the first 2 bits ("10"). This also means that xyxxy is not a prefix of any Lyndon word over the alphabet {x,y}.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
- Wikipedia, Lyndon word.
Crossrefs
Cf. A328870.
Programs
-
Python
def ok(n): w = bin(n)[2:] return any(any(w[:k] < w[i:i+k] for i in range(1, len(w)-k+1)) for k in range(2, len(w))) print([k for k in range(157) if ok(k)]) # Michael S. Branicky, Nov 09 2023
Comments