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.

A349955 Numbers whose representation in any base b >= 2 is a cubefree word.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 18, 19, 20, 22, 25, 36, 37, 38, 44, 45, 50, 51, 52, 74, 75, 76, 77, 89, 90, 100, 101, 102, 105, 109, 147, 150, 153, 154, 165, 166, 173, 178, 179, 180, 181, 204, 205, 210, 214, 217, 293, 294, 300, 301, 306, 308, 309, 329, 330
Offset: 1

Views

Author

Vladimir Reshetnikov, Mar 20 2022

Keywords

Comments

A subsequence of A178905. A subsequence of A286262.

Crossrefs

Programs

  • Mathematica
    Prepend[Cases[Range[330], n_ /; NoneTrue[Range[2, (Sqrt[4 n - 3] - 1)/2], MatchQ[IntegerDigits[n, #], {_, d__, d__, d__, _}] &]], 0]
  • Python
    from sympy.ntheory.digits import digits
    def hascube(s):
        for l in range(1, len(s)//3 + 1):
          for i in range(len(s) - 3*l + 1):
              if s[i:i+l] == s[i+l:i+2*l] == s[i+2*l:i+3*l]: return True
        return False
    def ok(n):
        if n < 7: return True
        b = 2
        d = digits(n, b)[1:]
        while len(d) >= 3:
            if hascube(d):
                return False
            b += 1
            d = digits(n, b)[1:]
        return True
    print([k for k in range(331) if ok(k)]) # Michael S. Branicky, Mar 27 2022