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 A349955 #19 Mar 28 2022 07:43:43 %S A349955 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, %T A349955 75,76,77,89,90,100,101,102,105,109,147,150,153,154,165,166,173,178, %U A349955 179,180,181,204,205,210,214,217,293,294,300,301,306,308,309,329,330 %N A349955 Numbers whose representation in any base b >= 2 is a cubefree word. %C A349955 A subsequence of A178905. A subsequence of A286262. %H A349955 Michael S. Branicky, <a href="/A349955/b349955.txt">Table of n, a(n) for n = 1..10000</a> %H A349955 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CubefreeWord.html">Cubefree Word</a>. %t A349955 Prepend[Cases[Range[330], n_ /; NoneTrue[Range[2, (Sqrt[4 n - 3] - 1)/2], MatchQ[IntegerDigits[n, #], {___, d__, d__, d__, ___}] &]], 0] %o A349955 (Python) %o A349955 from sympy.ntheory.digits import digits %o A349955 def hascube(s): %o A349955 for l in range(1, len(s)//3 + 1): %o A349955 for i in range(len(s) - 3*l + 1): %o A349955 if s[i:i+l] == s[i+l:i+2*l] == s[i+2*l:i+3*l]: return True %o A349955 return False %o A349955 def ok(n): %o A349955 if n < 7: return True %o A349955 b = 2 %o A349955 d = digits(n, b)[1:] %o A349955 while len(d) >= 3: %o A349955 if hascube(d): %o A349955 return False %o A349955 b += 1 %o A349955 d = digits(n, b)[1:] %o A349955 return True %o A349955 print([k for k in range(331) if ok(k)]) # _Michael S. Branicky_, Mar 27 2022 %Y A349955 Cf. A178905, A286262. %K A349955 nonn,base %O A349955 1,3 %A A349955 _Vladimir Reshetnikov_, Mar 20 2022