cp's OEIS Frontend

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.

Showing 1-2 of 2 results.

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.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Nov 05 2023

Keywords

Comments

These are numbers whose binary expansion corresponds to an invalid prefix of a Lyndon word on a two-letter alphabet. If the alphabet is {x, y}, where x < y, then taking the binary expansion of a(n) and mapping 1 to x and 0 to y results in a string that is not a prefix to any Lyndon word. Moreover, this sequence enumerates all strings starting with x that are not prefixes of Lyndon words on this alphabet.
A328870 is a subsequence of this sequence.
For k>=4, the number of k-bit terms in this sequence is 1,3,10,24,58,130,287,613,1302,2720,5655,11665,23969,...

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}.
		

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

A328869 Numbers whose lengths of runs of 1's in their reversed binary expansion are weakly increasing.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 40, 41, 42, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 68, 69, 72, 73, 74, 80, 81, 82, 84, 85, 96, 97, 98, 99
Offset: 1

Views

Author

Gus Wiseman, Nov 12 2019

Keywords

Examples

			The sequence of terms together with their reversed binary expansions begins:
   1: (1)
   2: (01)
   3: (11)
   4: (001)
   5: (101)
   6: (011)
   7: (111)
   8: (0001)
   9: (1001)
  10: (0101)
  12: (0011)
  13: (1011)
  14: (0111)
  15: (1111)
  16: (00001)
  17: (10001)
  18: (01001)
  20: (00101)
  21: (10101)
  24: (00011)
		

Crossrefs

Complement of A328870.
The version for prime indices is A304678.
The binary expansion of n has A069010(n) runs of 1's.

Programs

  • Mathematica
    Select[Range[100],LessEqual@@Length/@Split[Join@@Position[Reverse[IntegerDigits[#,2]],1],#2==#1+1&]&]
Showing 1-2 of 2 results.