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-7 of 7 results.

A296364 a(n) = A296349(n) - A030304(n).

Original entry on oeis.org

0, 0, 0, 3, 0, 7, 11, 11, 0, 16, 0, 28, 29, 37, 38, 31, 0, 37, 54, 43, 7, 49, 3, 83, 73, 90, 75, 104, 106, 104, 105, 79, 0, 86, 124, 93, 0, 154, 144, 107, 32, 121, 164, 168, 39, 131, 212, 207, 177, 215, 233, 210, 181, 231, 183, 267, 258, 276, 218, 281
Offset: 0

Views

Author

N. J. A. Sloane, Dec 16 2017

Keywords

Comments

Another measure of the binary "early-birdness" of n (cf. A296356, A116700).

Crossrefs

A031297 a(n) is the least k such that the base-10 representation of n begins at s(k), where s=A007376.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 1, 16, 18, 20, 22, 24, 26, 28, 30, 15, 34, 2, 38, 40, 42, 44, 46, 48, 50, 17, 37, 56, 3, 60, 62, 64, 66, 68, 70, 19, 39, 59, 78, 4, 82, 84, 86, 88, 90, 21, 41, 61, 81, 100, 5, 104, 106, 108, 110, 23, 43, 63, 83
Offset: 1

Views

Author

Keywords

Comments

A229186 is the same sequence including the a(0) term.

Examples

			a(1) = a(12) = a(123) = 1 since they each start at index 1 in 0123.
a(21) = 15 since it appears first at index 15 in 012345678910111213.
		

Crossrefs

Cf. A007376, A229186 (same sequence but including the a(0) term).
Cf. A165449.
Cf. A030304 (binary variant).

Programs

  • Maple
    with(StringTools): s:="": for n from 1 to 70 do s:=cat(s,convert(n,string)): od: seq(Search(convert(n, string), s), n=1..70); # Nathaniel Johnston, May 26 2011
  • Mathematica
    nmax = 100;
    s = Table[IntegerDigits[n], {n, 0, nmax}] // Flatten;
    a[n_] := SequencePosition[s, IntegerDigits[n], 1][[1, 1]] - 1;
    Array[a, nmax] (* Jean-François Alcover, Feb 21 2021 *)
  • Python
    from itertools import count, islice
    def agen():
        k, chap = 0, "0"
        for n in count(1):
            target = str(n)
            while chap.find(target) == -1: k += 1; chap += str(k)
            yield chap.find(target)
    print(list(islice(agen(), 70))) # Michael S. Branicky, Oct 06 2022

A083655 Numbers which do not appear prematurely in the binary Champernowne word (A030190).

Original entry on oeis.org

0, 1, 2, 4, 8, 10, 16, 32, 36, 64, 128, 136, 256, 512, 528, 1024, 2048, 2080, 4096, 8192, 8256, 16384, 32768, 32896, 65536, 131072, 131328, 262144, 524288, 524800, 1048576, 2097152, 2098176, 4194304, 8388608, 8390656, 16777216, 33554432
Offset: 0

Views

Author

Reinhard Zumkeller, May 01 2003

Keywords

Comments

In other words, numbers k whose binary expansion first appears in A030190 at its expected place, i.e., n appears first starting at position A296349(n). - N. J. A. Sloane, Dec 17 2017
a(n) are the Base 2 "Punctual Bird" numbers: write the nonnegative integers, base 2, in a string 011011100101110111.... Sequence gives numbers which do not occur in the string ahead of their natural place. - Graeme McRae, Aug 11 2007

Crossrefs

A000079 is a subsequence.
For the complement, the "Early Bird" numbers, see A296365.

Programs

  • Mathematica
    LinearRecurrence[{0,0,6,0,0,-8},{0,1,2,4,8,10,16,32,36},50] (* Harvey P. Dale, Aug 19 2020 *)
  • PARI
    a(n)= if (n<=2, n, my (m=n\3); if (n%3==0, 2^(2*m), n%3==1, 2^(2*m+1), 2^m + 2^(2*m+1)))  \\ Rémy Sigrist, Jun 14 2020
    
  • PARI
    concat(0, Vec(x*(1 + 2*x + 4*x^2 + 2*x^3 - 2*x^4 - 8*x^5 - 8*x^6 - 8*x^7) / ((1 - 2*x^3)*(1 - 4*x^3)) + O(x^40))) \\ Colin Barker, Jun 14 2020
    
  • PARI
    a(n) = 2^((2*n+1)\3) + (n%3==2)<<(n\3) - (n<3) \\ Charles R Greathouse IV, Dec 16 2022

Formula

A083653(a(n))=a(n), A083654(a(n))=1.
a(0)=0, a(1)=1, a(2)=2; then for n>=1, a(3n)=2^(2n), a(3n+1)=2^(2n+1), a(3n+2)=2^(2n+1)+2^n. - Graeme McRae, Aug 11 2007
From Colin Barker, Jun 14 2020: (Start)
G.f.: x*(1 + 2*x + 4*x^2 + 2*x^3 - 2*x^4 - 8*x^5 - 8*x^6 - 8*x^7) / ((1 - 2*x^3)*(1 - 4*x^3)).
a(n) = 6*a(n-3) - 8*a(n-6) for n>8. (End)
a(n) = 2^floor(2*(n+2)/3-1) + (floor((n+1)/3)-floor(n/3))*2^(floor(n/3)) - floor(5/(n+3)). - Alan Michael Gómez Calderón, Dec 15 2022

Extensions

More terms from Graeme McRae, Aug 11 2007

A083653 Consider the binary Champernowne sequence (A030190): smallest number m such that in binary representation n is contained in the concatenation of m and its successors.

Original entry on oeis.org

0, 1, 2, 1, 4, 2, 1, 3, 8, 4, 10, 2, 3, 1, 3, 7, 16, 8, 4, 9, 18, 10, 21, 2, 7, 3, 9, 1, 3, 5, 7, 15, 32, 16, 8, 17, 36, 4, 9, 19, 34, 18, 10, 10, 37, 21, 2, 6, 15, 7, 3, 12, 19, 9, 21, 1, 7, 3, 19, 5, 7, 13, 15, 31, 64, 32, 16, 33, 8, 34, 17, 35, 68, 36, 18, 4, 73, 9, 19, 39, 66, 34, 20, 18
Offset: 0

Views

Author

Reinhard Zumkeller, May 01 2003

Keywords

Comments

a(n)<=n; see A083655 for numbers m with a(m)=m;
a(A055143(n))=1;
A083654(n)-1 = number of successors of a(n) to cover n.

Examples

			n=24: '11000'=24 is a suffix of the concatenation of the first 8 numbers: '0'1'10'11'100'101'110'111'1000', therefore a(24)=7 and A083654(24)=2.
		

Crossrefs

Cf. A030190, A030304, A007088, A345672 (decimal analog).

Programs

  • PARI
    See Links section.

Extensions

Edited by Charles R Greathouse IV, Apr 26 2010

A083654 Consider the binary Champernowne sequence (A030190): number of successive numbers to be concatenated beginning with A083653(n) such that in binary representation n is contained.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 3, 2, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 2, 2, 3, 2, 4, 2, 3, 2, 3, 2, 3, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 3, 3, 2, 3, 3, 2, 2, 3, 2, 2, 2
Offset: 0

Views

Author

Reinhard Zumkeller, May 01 2003

Keywords

Comments

a(2^k)=1, see A083655 for all numbers m with a(m)=1;

Examples

			n=24: '11000'=24 is a suffix of the concatenation of the first 8 numbers: '0'1'10'11'100'101'110'111'1000', therefore a(24)=2 and A083653(24)=7.
		

Crossrefs

A341798 a(n) is the starting position of the first occurrence of the binary reversal of n in the binary Champernowne word (A030190).

Original entry on oeis.org

0, 1, 0, 1, 7, 2, 0, 4, 19, 6, 8, 1, 23, 2, 3, 15, 51, 18, 21, 5, 7, 26, 0, 11, 56, 22, 8, 1, 66, 2, 14, 46, 131, 50, 54, 17, 20, 63, 58, 4, 143, 6, 27, 25, 23, 77, 10, 41, 137, 55, 21, 34, 7, 28, 0, 11, 149, 65, 8, 1, 173, 13, 45, 125, 323, 130, 135, 49, 53
Offset: 0

Views

Author

Rémy Sigrist, Feb 20 2021

Keywords

Comments

This sequence is a variant of A030304.
When considering the binary reversal of a positive number, the trailing zeros in that number turn into leading zeros in its binary reversal; we keep those leading zeros.

Examples

			For n = 4:
- the binary reversal of 4 is "001",
- the binary Champernowne word begins "0110111001011...",
- the first occurrence of "001" in this word starts at position 7,
- so a(4) = 7.
		

Crossrefs

Programs

  • Perl
    See Links section.
    
  • Python
    from itertools import count, islice
    def agen():
        k, chap = 0, "0"
        for n in count(0):
            target = bin(n)[2:][::-1]
            while chap.find(target) == -1: k += 1; chap += bin(k)[2:]
            yield chap.find(target)
    print(list(islice(agen(), 70))) # Michael S. Branicky, Oct 06 2022

Formula

a(n) = A030304(n) iff n is a binary palindrome (A006995).

A347196 Let c(k) be the infinite binary string 010111001... (A030308), the concatenation of reverse order integer binary words ( 0;1;01;11;001;101;... ). a(n) is the bit index k of the first occurrence of the reverse order binary word of n ( n = 2^0*c(a(n)) + 2^1*c(a(n)+1) + ... ).

Original entry on oeis.org

0, 1, 0, 3, 6, 1, 2, 3, 18, 5, 0, 8, 6, 1, 2, 13, 50, 17, 32, 4, 23, 9, 7, 29, 18, 5, 0, 37, 34, 1, 12, 13, 130, 49, 88, 16, 67, 31, 20, 3, 56, 22, 24, 8, 6, 38, 28, 84, 50, 17, 32, 4, 70, 9, 39, 36, 90, 33, 0, 40, 110, 11, 12, 43, 322, 129, 224, 48, 175, 87, 53, 15
Offset: 0

Views

Author

Thomas Scheuerle, Aug 22 2021

Keywords

Comments

It is not surprising to see dyadic self-similarity in the graph of this sequence. For example the graph of a(0..2^9) looks like a rescaled version of a(0..2^8). Each of these intervals reminds a bit of particle traces in a cloud chamber.

Examples

			pos:0,1,2,3,4,5,6,7,8,9,...
c:  0|1|0,1|1,1|0,0,1|1,0,1...
    0                           a(0) = 0
    . 1                         a(1) = 1
    0 1                         a(2) = 0
    . . . 1 1                   a(3) = 3
    . . . . . . 0 0 1           a(4) = 6
    . 1 0 1                     a(5) = 1
    . . 0 1 1                   a(6) = 2
		

Crossrefs

Programs

  • MATLAB
    function a = A347196( max_n)
        c = 0; a = 0;
        for n = 1:max_n
            b = bitget(n,1:64);
            c = [c b(1:find(b == 1, 1, 'last' ))];
        end
        for n = 1:max_n
            b = bitget(n,1:64);
            word = b(1:find(b == 1, 1, 'last' ));
            pos = strfind(c, word);
            a(n+1) = pos(1)-1;
        end
    end

Formula

a(n) <= Sum_{k=0..n} A070939(k).
Showing 1-7 of 7 results.