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.

A366160 Numbers whose binary expansion is not quasiperiodic.

Original entry on oeis.org

1, 2, 4, 5, 6, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79
Offset: 1

Views

Author

DarĂ­o Clavijo, Oct 02 2023

Keywords

Comments

See A320441 for the definition of quasiperiodic.
All numbers 2^k + 1 >= 5 are terms (A000051).
All powers of 2 are terms (A000079).

Crossrefs

Cf. A000051, A000079, A000225, A320441 (complement).

Programs

  • Python
    A000225 = lambda n: (1 << n) - 1
    def isA320441(k):
      # Code after Michael S. Branicky, Mar 24 2022 in A320434.
      tt, l = 1, k.bit_length()
      for x in range(0, l + 1):
        m = A000225(x)
        t = k & m
        if (t != tt):
          if (t == k): return False
          r = k
          for g in range(0, x):
            r >>= 1
            if (r & m == t) and (r == t): return True
          tt = t
    print([n for n in range(1,80) if not isA320441(n)])