login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A286262 Numbers whose binary expansion is a cubefree string. 6
0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 18, 19, 20, 21, 22, 25, 26, 27, 36, 37, 38, 41, 43, 44, 45, 50, 51, 52, 53, 54, 73, 74, 75, 76, 77, 82, 83, 86, 89, 90, 91, 100, 101, 102, 105, 107, 108, 109, 146, 147, 148, 150, 153, 154, 155, 164, 165, 166, 172, 173, 178, 179, 180, 181, 182 (list; graph; refs; listen; history; text; internal format)
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

Cf. A028445, A063037, A286261 (complement of this sequence).

Sequence in context: A032845 A023776 A063037 * A201992 A236562 A157189

Adjacent sequences:  A286259 A286260 A286261 * A286263 A286264 A286265

KEYWORD

nonn,base

AUTHOR

M. F. Hasler, May 05 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:18 EDT 2019. Contains 322282 sequences. (Running on oeis4.)