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.

A286261 Numbers whose binary expansion is not a cubefree string.

This page as a plain text file.
%I A286261 #16 Nov 30 2020 15:27:41
%S A286261 7,8,14,15,16,17,23,24,28,29,30,31,32,33,34,35,39,40,42,46,47,48,49,
%T A286261 55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,78,79,80,81,84,
%U A286261 85,87,88,92,93,94,95,96,97,98,99,103,104,106,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130
%N A286261 Numbers whose binary expansion is not a cubefree string.
%C A286261 Cubefree means that there is no substring which is the repetition of three identical nonempty strings, see examples.
%C A286261 If n is in the sequence, any number of the form n*2^k + m with 0 <= m < 2^k is in the sequence, and also any number of the form m*2^k + n with 2^k > n, m >= 0.
%H A286261 Chai Wah Wu, <a href="/A286261/b286261.txt">Table of n, a(n) for n = 1..10000</a>
%F A286261 a(n) ~ n: the sequence has asymptotic density one.
%e A286261 7 is in the sequence, because 7 = 111[2] contains three consecutive "1"s.
%e A286261 8 is in the sequence, because 8 = 1000[2] contains three consecutive "0"s.
%e A286261 42 is in the sequence, because 42 = 101010[2] contains three consecutive "10"s.
%e A286261 From the comment follows that all numbers of the form 7*2^k, 8*2^k or 42*2^k are in the sequence, for any k >= 0.
%e A286261 All numbers congruent to 7 or congruent to 0 (mod 8) are in the sequence.
%e A286261 All numbers of the form m*2^(k+3) +- n with n < 2^k are in the sequence.
%o A286261 (Python)
%o A286261 from __future__ import division
%o A286261 def is_cubefree(s):
%o A286261     l = len(s)
%o A286261     for i in range(l-2):
%o A286261         for j in range(1,(l-i)//3+1):
%o A286261             if s[i:i+2*j] == s[i+j:i+3*j]:
%o A286261                 return False
%o A286261     return True
%o A286261 A286261_list = [n for n in range(10**4) if not is_cubefree(bin(n)[2:])] # _Chai Wah Wu_, May 06 2017
%Y A286261 Cf. A028445, A286262 (complement of this sequence).
%K A286261 nonn,base
%O A286261 1,1
%A A286261 _M. F. Hasler_, May 05 2017