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.

Showing 1-10 of 14 results. Next

A003754 Numbers with no adjacent 0's in binary expansion.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 21, 22, 23, 26, 27, 29, 30, 31, 42, 43, 45, 46, 47, 53, 54, 55, 58, 59, 61, 62, 63, 85, 86, 87, 90, 91, 93, 94, 95, 106, 107, 109, 110, 111, 117, 118, 119, 122, 123, 125, 126, 127, 170, 171, 173, 174, 175, 181
Offset: 1

Views

Author

Keywords

Comments

Theorem (J.-P. Allouche, J. Shallit, G. Skordev): This sequence = A052499 - 1.
Ahnentafel numbers of ancestors contributing the X-chromosome to a female. A280873 gives the male inheritance. - Floris Strijbos, Jan 09 2017 [Equivalence with this sequence pointed out by John Blythe Dobson, May 09 2018]
The k-th composition in standard order (row k of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions. This sequence lists all numbers k such that the k-th composition in standard order has no parts greater than two. See the corresponding example below. - Gus Wiseman, Apr 04 2020
The binary representation of a(n+1) has the same string of digits as the lazy Fibonacci (also known as dual Zeckendorf) representation of n that uses 0s and 1s. (The "+1" is essentially an adjustment for the offset of this sequence.) - Peter Munn, Sep 06 2022

Examples

			21 is in the sequence because 21 = 10101_2. '10101' has no '00' present in it. - _Indranil Ghosh_, Feb 11 2017
From _Gus Wiseman_, Apr 04 2020: (Start)
The terms together with the corresponding compositions begin:
    0: ()            30: (1,1,1,2)         90: (2,1,2,2)
    1: (1)           31: (1,1,1,1,1)       91: (2,1,2,1,1)
    2: (2)           42: (2,2,2)           93: (2,1,1,2,1)
    3: (1,1)         43: (2,2,1,1)         94: (2,1,1,1,2)
    5: (2,1)         45: (2,1,2,1)         95: (2,1,1,1,1,1)
    6: (1,2)         46: (2,1,1,2)        106: (1,2,2,2)
    7: (1,1,1)       47: (2,1,1,1,1)      107: (1,2,2,1,1)
   10: (2,2)         53: (1,2,2,1)        109: (1,2,1,2,1)
   11: (2,1,1)       54: (1,2,1,2)        110: (1,2,1,1,2)
   13: (1,2,1)       55: (1,2,1,1,1)      111: (1,2,1,1,1,1)
   14: (1,1,2)       58: (1,1,2,2)        117: (1,1,2,2,1)
   15: (1,1,1,1)     59: (1,1,2,1,1)      118: (1,1,2,1,2)
   21: (2,2,1)       61: (1,1,1,2,1)      119: (1,1,2,1,1,1)
   22: (2,1,2)       62: (1,1,1,1,2)      122: (1,1,1,2,2)
   23: (2,1,1,1)     63: (1,1,1,1,1,1)    123: (1,1,1,2,1,1)
   26: (1,2,2)       85: (2,2,2,1)        125: (1,1,1,1,2,1)
   27: (1,2,1,1)     86: (2,2,1,2)        126: (1,1,1,1,1,2)
   29: (1,1,2,1)     87: (2,2,1,1,1)      127: (1,1,1,1,1,1,1)
(End)
		

Crossrefs

A104326(n) = A007088(a(n)); A023416(a(n)) = A087116(a(n)); A107782(a(n)) = 0; A107345(a(n)) = 1; A107359(n) = a(n+1) - a(n); a(A001911(n)) = A000225(n); a(A000071(n+2)) = A000975(n). - Reinhard Zumkeller, May 25 2005
Cf. A003796 (no 000), A004745 (no 001), A004746 (no 010), A004744 (no 011), A004742 (no 101), A004743 (no 110), A003726 (no 111).
Complement of A004753.
Positions of numbers <= 2 in A333766 (see this and A066099 for other sequences about compositions in standard order).
Cf. A318928.

Programs

  • Haskell
    a003754 n = a003754_list !! (n-1)
    a003754_list = filter f [0..] where
       f x = x == 0 || x `mod` 4 > 0 && f (x `div` 2)
    -- Reinhard Zumkeller, Dec 07 2012, Oct 19 2011
    
  • Maple
    isA003754 := proc(n) local bdgs ; bdgs := convert(n,base,2) ; for i from 2 to nops(bdgs) do if op(i,bdgs)=0 and op(i-1,bdgs)= 0 then return false; end if; end do; return true; end proc:
    A003754 := proc(n) option remember; if n= 1 then 0; else for a from procname(n-1)+1 do if isA003754(a) then return a; end if; end do: end if; end proc:
    # R. J. Mathar, Oct 23 2010
  • Mathematica
    Select[ Range[0, 200], !MatchQ[ IntegerDigits[#, 2], {_, 0, 0, _}]&] (* Jean-François Alcover, Oct 25 2011 *)
    Select[Range[0,200],SequenceCount[IntegerDigits[#,2],{0,0}]==0&] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, May 21 2015 *)
  • PARI
    is(n)=n=bitor(n,n>>1)+1; n>>=valuation(n,2); n==1 \\ Charles R Greathouse IV, Feb 06 2017
    
  • Python
    i=0
    while i<=500:
        if "00" not in bin(i)[2:]:
            print(str(i), end=',')
        i+=1 # Indranil Ghosh, Feb 11 2017

Formula

Sum_{n>=2} 1/a(n) = 4.356588498070498826084131338899394678478395568880140707240875371925764128502... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 12 2022

Extensions

Removed "2" from the name, because, for example, one could argue that 10001 has 3 adjacent zeros, not 2. - Gus Wiseman, Apr 04 2020

A003726 Numbers with no 3 adjacent 1's in binary expansion.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 48, 49, 50, 51, 52, 53, 54, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 80, 81, 82
Offset: 1

Views

Author

Keywords

Comments

Positions of zeros in A014082. Could be called "tribbinary numbers" by analogy with A003714. - John Keith, Mar 07 2022
The sequence of Tribbinary numbers can be constructed by writing out the Tribonacci representations of nonnegative integers and then evaluating the result in binary. These numbers are similar to Fibbinary numbers A003714, Fibternary numbers A003726, and Tribternary numbers A356823. The number of Tribbinary numbers less than any power of two is a Tribonacci number. We can generate Tribbinary numbers recursively: Start by adding 0 and 1 to the sequence. Then, if x is a number in the sequence add 2x, 4x+1, and 8x+3 to the sequence. The n-th Tribbinary number is even if the n-th term of the Tribonacci word is a. Respectively, the n-th Tribbinary number is of the form 4x+1 if the n-th term of the Tribonacci word is b, and the n-th Tribbinary number is of the form 8x+3 if the n-th term of the Tribonacci word is c. Every nonnegative integer can be written as the sum of two Tribbinary numbers. Every number has a Tribbinary multiple. - Tanya Khovanova and PRIMES STEP Senior, Aug 30 2022

Crossrefs

Cf. A278038 (binary), A063037, A000073, A014082 (number of 111).
Cf. A004781 (complement).
Cf. A007088; A003796 (no 000), A004745 (no 001), A004746 (no 010), A004744 (no 011), A003754 (no 100), A004742 (no 101), A004743 (no 110).

Programs

  • Haskell
    a003726 n = a003726_list !! (n - 1)
    a003726_list = filter f [0..] where
       f x = x < 7 || (x `mod` 8) < 7 && f (x `div` 2)
    -- Reinhard Zumkeller, Jun 03 2012
    
  • Mathematica
    Select[Range[0, 82], SequenceCount[IntegerDigits[#, 2], {1, 1, 1}] == 0 &] (* Michael De Vlieger, Dec 23 2019 *)
  • PARI
    is(n)=!bitand(bitand(n, n<<1), n<<2) \\ Charles R Greathouse IV, Feb 11 2017

Formula

There are A000073(n+3) terms of this sequence with at most n bits. In particular, a(A000073(n+3)+1) = 2^n. - Charles R Greathouse IV, Oct 22 2021
Sum_{n>=2} 1/a(n) = 9.516857810319139410424631558212354346868048230248717360943194590798113163384... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 13 2022

A352103 a(n) is the maximal (or lazy) tribonacci representation of n using a binary system of vectors not containing three consecutive 0's.

Original entry on oeis.org

0, 1, 10, 11, 100, 101, 110, 111, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10010, 10011, 10100, 10101, 10110, 10111, 11001, 11010, 11011, 11100, 11101, 11110, 11111, 100100, 100101, 100110, 100111, 101001, 101010, 101011, 101100, 101101, 101110, 101111, 110010
Offset: 0

Views

Author

Amiram Eldar, Mar 05 2022

Keywords

Comments

Each nonnegative integer has 2 unique representations as sums of distinct positive tribonacci numbers (A000073): 1, 2, 4, 7, 13, 24, ...: the minimal (or greedy, A278038) representation in which there are no 3 consecutive 1's (i.e., no 3 consecutive tribonacci numbers appear in the sum), and the maximal (or lazy) representation of n in which no 3 consecutive 0's appear.

Examples

			a(5) = 101 = 4 + 1.
a(6) = 110 = 4 + 2.
a(7) = 111 = 4 + 2 + 1.
		

Crossrefs

Similar sequences: A104326 (Fibonacci), A130311 (Lucas).

Programs

  • Mathematica
    t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; trib[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; IntegerDigits[Total[2^(s - 1)], 2]]; a[n_] := Module[{v = trib[n]}, nv = Length[v]; i = 1; While[i <= nv - 3, If[v[[i ;; i + 3]] == {1, 0, 0, 0}, v[[i ;; i + 3]] = {0, 1, 1, 1}; If[i > 3, i -= 4]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, FromDigits[v[[i[[1, 1]] ;; -1]]]]]; Array[a, 100, 0]

Formula

a(n) = A007088(A003796(n+1)).

A063037 Numbers without 3 consecutive equal binary digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 18, 19, 20, 21, 22, 25, 26, 27, 36, 37, 38, 41, 42, 43, 44, 45, 50, 51, 52, 53, 54, 73, 74, 75, 76, 77, 82, 83, 84, 85, 86, 89, 90, 91, 100, 101, 102, 105, 106, 107, 108, 109, 146, 147, 148, 149, 150, 153, 154, 155, 164, 165, 166
Offset: 1

Views

Author

Lior Manor, Jul 05 2001

Keywords

Comments

Complement of A136037; intersection of A003796 and A003726. - Reinhard Zumkeller, Dec 11 2007
From Emeric Deutsch, Jan 27 2018: (Start)
Also 0 together with the indices of the compositions that have no parts larger than 2. For the definition of the index of a composition see A298644.
For example, 105 is in the sequence since its binary form is 1101001 and the composition [2,1,1,2,1] has no parts larger than 2.
On the other hand, 132 is not in the sequence since its binary form is 10000100 and the composition [1,4,1,2] has a part larger than 2.
The command c(n) from the Maple program yields the composition having index n. (End)
The sequence contains A000045(n+1) positive terms with binary length n. - Rémy Sigrist, Sep 30 2022

Examples

			The binary representation of 9 (1001) has no 3 consecutive equal digits.
		

Crossrefs

Programs

  • Maple
    isA063037 := proc(n)
        local bdgs,rep,d,i ;
        if n = 0 then
            return true;
        end if;
        bdgs := convert(n,base,2) ;
        rep := 1;
        d := op(1,bdgs) ;
        for i from 2 to nops(bdgs) do
            if op(i,bdgs) = op(i-1,bdgs) then
                rep := rep+1 ;
            else
                rep :=1 ;
            end if ;
            if rep > 2 then
                return false;
            end if;
        end do:
        return true ;
    end proc:
    for n from 0 to 50 do
        if isA063037(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Dec 18 2013
    # Second Maple program:
    Runs := proc (L) local j, r, i, k: j := 1: r[j] := L[1]: for i from 2 to nops(L) do if L[i] = L[i-1] then r[j] := r[j], L[i] else j := j+1: r[j] := L[i] end if end do: [seq([r[k]], k = 1 .. j)] end proc: RunLengths := proc (L) map(nops, Runs(L)) end proc: c := proc (n) ListTools:-Reverse(convert(n, base, 2)): RunLengths(%) end proc: A := {0}: for n to 250 do if `subset`(convert(c(n), set), {1, 2}) then A := `union`(A, {n}) else end if end do: A; # most of this Maple program is due to W. Edwin Clark. - Emeric Deutsch, Jan 27 2018
  • Mathematica
    Select[Range[0, 168], AllTrue[Length /@ Split@ IntegerDigits[#, 2], # < 3 &] &] (* Michael De Vlieger, Aug 20 2017 *)
  • PARI
    { n=0; for (m=0, 10^9, x=m; t=1; b=2; while (x>0, d=x-2*(x\2); x\=2; if (d==b, c++; if (c==3, t=x=0), b=d; c=1)); if (t, write("b063037.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 16 2009
    
  • PARI
    a(n) = { n--; if (n<=1, return (n), my (s=1); for (i=1, oo, my (f=fibonacci(i+1)); if (nRémy Sigrist, Sep 30 2022
    
  • Python
    from itertools import count, islice
    def A063037_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n: not ('000' in (s:=bin(n)[2:]) or '111' in s), count(max(0,startvalue)))
    A063037_list = list(islice(A063037_gen(),20)) # Chai Wah Wu, Oct 04 2022

Formula

It appears (but has not yet been proved) that the terms of {a(n)} can be computed recursively as follows. Let {c(i)} be defined for i >= 4 by c(i) = 2c(i-1) + 1, if i is a multiple of 3, else c(i) = 2c(i-1) - 1, with c(4) = 1. I.e., {c(i)} = {1,1,3,5,9,19,37,73,147,...}, for i=4,5,6,... . Let a(1)=1, a(2)=2, a(3)=3. For n > 3, choose k so that F(k)-2 < n <= F(k+1)-2, where F(k) denotes the k-th Fibonacci number (A000045). Then a(n) = c(k) + 2a(F(k)-2) - a(2F(k)-n-3). This has been verified for n up to 1100. - John W. Layman, May 26 2009

Extensions

Missing "less than" sign supplied in the conjectured recurrence (thanks to Franklin T. Adams-Watters for pointing this out) by John W. Layman, Nov 09 2009

A004742 Numbers whose binary expansion does not contain 101.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 9, 12, 14, 15, 16, 17, 18, 19, 24, 25, 28, 30, 31, 32, 33, 34, 35, 36, 38, 39, 48, 49, 50, 51, 56, 57, 60, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 76, 78, 79, 96, 97, 98, 99, 100, 102, 103, 112, 113, 114, 115, 120, 121, 124, 126, 127
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007088; A003796 (no 000), A004745 (no 001), A004746 (no 010), A004744 (no 011), A003754 (no 100), A004743 (no 110), A003726 (no 111).

Programs

  • Haskell
    a004742 n = a004742_list !! (n-1)
    a004742_list = filter f [0..] where
       f x  = x < 4 || x `mod` 8 /= 5 && f (x `div` 2)
    -- Reinhard Zumkeller, Jul 01 2013
  • Mathematica
    Select[Range[0, 130], !StringContainsQ[IntegerString[#, 2], "101"] &] (* Amiram Eldar, Feb 13 2022 *)
  • PARI
    is(n)=n=binary(n);for(i=3,#n,if(n[i]&&n[i-2]&&!n[i-1],return(0))); 1 \\ Charles R Greathouse IV, Mar 26 2013
    
  • PARI
    is(n)=while(n>4, if(bitand(n,7)==5, return(0)); n>>=1); 1 \\ Charles R Greathouse IV, Feb 11 2017
    
  • PARI
    is(n)=!bitand(bitand(n,n>>2),bitneg(n>>1)) \\ Charles R Greathouse IV, Oct 28 2021
    
  • PARI
    searchLE(S,x)=my(t=setsearch(S,x)); if(t,t,setsearch(S,x,1)-1); \\ finds last element <= x
    expand(~v, lim)=my(b=exponent(v[#v]+1), B=1<lim, listpop(~v));
    list(lim)=lim\=1; if(lim<5, return(if(lim<0,[],[0..lim]))); my(v=List([0..3])); for(b=3,exponent(lim+1), expand(~v, 2^b-1)); expand(~v, lim); Vec(v)
    

Formula

Sum_{n>=2} 1/a(n) = 6.198475910942069028389983717965787117743378665090593775808705963863146498248... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 13 2022

A004743 Numbers whose binary expansion does not contain 110.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 23, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 47, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 79, 80, 81, 82, 83, 84, 85, 87, 95, 127, 128, 129, 130, 131, 132, 133, 135, 136, 137, 138, 139
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007088; A003796 (no 000), A004745 (no 001), A004746 (no 010), A004744 (no 011), A003754 (no 100), A004742 (no 101), A003726 (no 111).

Programs

  • Haskell
    a004743 n = a004743_list !! (n-1)
    a004743_list = filter f [0..] where
       f x  = x < 4 || x `mod` 8 /= 6 && f (x `div` 2)
    -- Reinhard Zumkeller, Jul 01 2013
  • Mathematica
    Select[Range[0, 140], !StringContainsQ[IntegerString[#, 2], "110"] &] (* Amiram Eldar, Feb 13 2022 *)
    Select[Range[0,150],SequenceCount[IntegerDigits[#,2],{1,1,0}]==0&] (* Harvey P. Dale, Mar 14 2025 *)
  • PARI
    is(n)=n=binary(n);for(i=3,#n,if(!n[i]&&n[i-2]&&n[i-1],return(0))); 1 \\ Charles R Greathouse IV, Mar 26 2013
    
  • PARI
    is(n)=while(n>5, if(bitand(n,7)==6, return(0)); n>>=1); 1 \\ Charles R Greathouse IV, Feb 11 2017
    

Formula

Sum_{n>=2} 1/a(n) = 5.126608057149204485684180689064467269298250594297584060475240185531109866051... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 13 2022

A004744 Numbers whose binary expansion does not contain 011.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 20, 21, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36, 37, 40, 41, 42, 48, 49, 50, 52, 53, 56, 57, 58, 60, 61, 62, 63, 64, 65, 66, 68, 69, 72, 73, 74, 80, 81, 82, 84, 85, 96, 97, 98, 100, 101, 104, 105
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007088; A003796 (no 000), A004745 (no 001), A004746 (no 010), A003754 (no 100), A004742 (no 101), A004743 (no 110), A003726 (no 111).

Programs

  • Haskell
    a004744 n = a004744_list !! (n-1)
    a004744_list = filter f [0..] where
       f x  = x < 4 || x `mod` 8 /= 3 && f (x `div` 2)
    -- Reinhard Zumkeller, Jul 01 2013
  • Mathematica
    Select[Range[0,110],!MemberQ[Partition[IntegerDigits[#,2],3,1],{0,1,1}]&] (* Harvey P. Dale, Oct 15 2013 *)
  • PARI
    is(n)=n=binary(n);for(i=3,#n,if(n[i]&&n[i-1]&&!n[i-2], return(0)));1 \\ Charles R Greathouse IV, Mar 26 2013
    
  • PARI
    is(n)=while(n>10, if(bitand(n,7)==3, return(0)); n>>=1); 1 \\ Charles R Greathouse IV, Feb 11 2017
    

Formula

Sum_{n>=2} 1/a(n) = 6.084750966700965350831194838591995529232464122788387705746226526437263331240... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 13 2022

A004745 Numbers whose binary expansion does not contain 001.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 40, 42, 43, 44, 45, 46, 47, 48, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 80, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 104, 106, 107, 108, 109, 110
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007088; A003796 (no 000), A004746 (no 010), A004744 (no 011), A003754 (no 100), A004742 (no 101), A004743 (no 110), A003726 (no 111).

Programs

  • Haskell
    a004745 n = a004745_list !! (n-1)
    a004745_list = filter f [0..] where
       f x  = x < 4 || x `mod` 8 /= 1 && f (x `div` 2)
    -- Reinhard Zumkeller, Jul 01 2013
  • Mathematica
    Select[Range[0, 110], ! StringContainsQ[IntegerString[#, 2], "001"] &] (* Amiram Eldar, Feb 13 2022 *)
    Select[Range[0,120],SequenceCount[IntegerDigits[#,2],{0,0,1}]==0&] (* Harvey P. Dale, Jul 05 2024 *)
  • PARI
    is(n)=n=binary(n);for(i=4,#n,if(n[i]&&!n[i-1]&&!n[i-2], return(0))); 1 \\ Charles R Greathouse IV, Mar 29 2013
    
  • PARI
    is(n)=while(n>8, if(bitand(n,7)==1, return(0)); n>>=1); 1 \\ Charles R Greathouse IV, Feb 11 2017
    

Formula

Sum_{n>=2} 1/a(n) = 5.808784664093998434778841785199192904637860758506854276321167162567685504669... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 13 2022

A004746 Numbers whose binary expansion does not contain 010.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 19, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 35, 38, 39, 44, 45, 46, 47, 48, 49, 51, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65, 67, 70, 71, 76, 77, 78, 79, 88, 89, 91, 92, 93, 94, 95, 96, 97, 99, 102
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007088; A003796 (no 000), A004745 (no 001), A004744 (no 011), A003754 (no 100), A004742 (no 101), A004743 (no 110), A003726 (no 111).

Programs

  • Haskell
    a004746 n = a004746_list !! (n-1)
    a004746_list = filter f [0..] where
       f x  = x < 4 || x `mod` 8 /= 2 && f (x `div` 2)
    -- Reinhard Zumkeller, Jul 01 2013
  • Mathematica
    Select[Range[0,110],SequenceCount[IntegerDigits[#,2],{0,1,0}]==0&] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, Oct 19 2015 *)
  • PARI
    is(n)=n=binary(n);for(i=4,#n,if(!n[i]&&n[i-1]&&!n[i-2], return(0))); 1 \\ Charles R Greathouse IV, Mar 29 2013
    
  • PARI
    is(n)=while(n>9, if(bitand(n,7)==2, return(0)); n>>=1); 1 \\ Charles R Greathouse IV, Feb 11 2017
    

Formula

Sum_{n>=2} 1/a(n) = 7.338340181978485860731253930056466995425939377143636935044890325770833657631... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 13 2022

A004779 Binary expansion contains 3 adjacent 0's.

Original entry on oeis.org

8, 16, 17, 24, 32, 33, 34, 35, 40, 48, 49, 56, 64, 65, 66, 67, 68, 69, 70, 71, 72, 80, 81, 88, 96, 97, 98, 99, 104, 112, 113, 120, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 152, 160, 161, 162, 163, 168
Offset: 0

Views

Author

Keywords

Crossrefs

Complement of A003796.

Programs

Formula

a(n) ~ n. - Charles R Greathouse IV, Oct 23 2015
Showing 1-10 of 14 results. Next