OFFSET
1,3
COMMENTS
Cubefree means that there is no substring which is the repetition of three identical nonempty strings, see examples.
If n is not in the sequence, no number of the form n*2^k + m with 0 <= m < 2^k can be in the sequence, nor any number of the form m*2^k + n with 2^k > n, m >= 0.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
FORMULA
lim a(n)/n = infinity: sequence has asymptotic density 0.
EXAMPLE
7 is not in the sequence, because 7 = 111[2] contains three consecutive "1"s.
8 is not in the sequence, because 8 = 1000[2] contains three consecutive "0"s.
More generally, no number congruent to 7 or congruent to 0 (mod 8) may be in the sequence.
Even more generally, no number of the form m*2^(k+3) +- n, n < 2^k, can be in this sequence.
42 is not in the sequence, because 42 = 101010[2] contains three consecutive "10"s.
From the comment follows that no number of the form 7*2^k, 8*2^k or 42*2^k may be in the sequence, for any k>=0. More generally, no number of the form 7*2^k + m, 8*2^k + m or 42*2^k + m may be in the sequence, for any 2^k > m >= 0.
MAPLE
isCubeFree:=proc(v) local n, L;
for n from 3 to nops(v) do for L to n/3 do
if v[n-L*2+1 .. n] = v[n-L*3+1 .. n-L] then RETURN(false) fi od od; true end;
a:=[];
for n from 1 to 512 do
if isCubeFree(convert(n, base, 2)) then a:=[op(a), n]; fi; od;
a;
PROG
(Python)
from __future__ import division
def is_cubefree(s):
l = len(s)
for i in range(l-2):
for j in range(1, (l-i)//3+1):
if s[i:i+2*j] == s[i+j:i+3*j]:
return False
return True
A286262_list = [n for n in range(10**4) if is_cubefree(bin(n)[2:])] # Chai Wah Wu, May 06 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, May 05 2017
STATUS
approved