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 16 results. Next

A118247 a(0)=0. Concatenate onto the end of the sequence (from left to right) the integer m_n converted into binary (with the most significant digit on the left), where m_n is the smallest integer > A118248(n-1) and whose binary representation does not occur anywhere earlier in the sequence (when the concatenated sequence is read from left to right). A118248(n) then equals m_n when written in decimal.

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0
Offset: 0

Views

Author

Leroy Quet, Apr 18 2006

Keywords

Comments

Sequence can be regarded as an irregular number triangle containing the binary digits of A118248(n) in row n. - Michael De Vlieger, Aug 19 2017

Examples

			The sequence begins 0,1,1,0,1,0,0,1,1,1,1,0,0,0. Now A118248(5) = 8, which is represented by the 1,0,0,0 at the end of the sequence. The binary representation of 9 (1001 in binary) and (decimal) 10 (1010 in binary) both occur earlier in the sequence. But the binary representation of (decimal) 11 (1011 in binary) does not occur earlier in the sequence, so (1,0,1,1) is added to the end of the sequence. And A118248(6) becomes 11.
From _Michael De Vlieger_, Aug 19 2017: (Start)
   n   A118248(n)  Binary digits appended to a(n)
   0           0       0
   1           1       1
   2           2      10
   3           4     100
   4           7     111
   5           8    1000
   6          11    1011
   7          16   10000
   8          18   10010
   9          21   10101
  10          22   10110
  11          25   11001
  12          29   11101
(End)
		

Crossrefs

Programs

  • Mathematica
    Block[{a = {{0}}, b = {0}, k, d}, Do[k = FromDigits[#, 2] &@ Last@ a + 1; While[SequenceCount[Flatten@ a, Set[d, IntegerDigits[k, 2]]] > 0, k++]; AppendTo[a, d]; AppendTo[b, k], {i, 22}]; Flatten@ a] (* Michael De Vlieger, Aug 19 2017 *)

Extensions

More terms from Joshua Zucker, Jul 27 2006

A128291 Complement of A118248.

Original entry on oeis.org

3, 5, 6, 9, 10, 12, 13, 14, 15, 17, 19, 20, 23, 24, 26, 27, 28, 30, 33, 34, 37, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 65, 66, 69, 71, 72, 73, 74, 77, 79, 80, 81, 82, 83, 84, 85, 86, 89, 91, 92, 94, 95, 96, 97, 98, 100
Offset: 0

Views

Author

Nick Hobson, Feb 24 2007

Keywords

Comments

Also: Numbers whose binary representation is a substring of the concatenation of the binary representation of all smaller nonnegative integers not listed earlier. - M. F. Hasler, Dec 29 2012

Examples

			The first term is 3, smallest integer whose binary representation "11"[2] is a substring of the concatenation of the smaller numbers 0,1,2 ~> concat(0,1,10)="0110".
Next is 5="101"[2], which is a substring of concat(0,1,2="10",4="100") = "0110100". Note that 3, since it occurs earlier, is excluded from the list of numbers which are concatenated. - _M. F. Hasler_, Dec 29 2012
		

Crossrefs

A357082 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that the binary string of a(n-1) + a(n) does not appear in the binary string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 10, 6, 9, 7, 17, 12, 20, 13, 16, 18, 11, 21, 15, 19, 23, 38, 26, 8, 24, 37, 27, 34, 30, 31, 33, 32, 40, 36, 28, 44, 41, 35, 29, 43, 39, 25, 47, 53, 51, 49, 42, 22, 50, 14, 58, 46, 54, 62, 65, 63, 66, 67, 61, 68, 60, 69, 59, 70, 74, 55, 73, 56, 72, 57, 71, 75, 78, 76, 52, 77, 92
Offset: 0

Views

Author

Scott R. Shannon, Sep 11 2022

Keywords

Comments

The main concentration of terms lie along the line a(n) = n, so numerous fixed points exists - there are 301 fixed points in the first 300000 terms. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(6) = 10 as the concatenation of a(0)..a(5) in binary is "011011100101" and a(5) + 10 = 5 + 10 = 15 = 1111_2 which does not appear in the concatenated string. Since  11 = 1011_2, 12 = 1100_2, 13 = 1101_2, 14 = 1110_2 all appear in the concatenated string, a(6) cannot be 6, 7, 8 or 9.
		

Crossrefs

Programs

Extensions

Images for n=0..300000 and n=0..2250000 corrected by Scott R. Shannon, Oct 05 2022

A118250 The least nonnegative integer whose reversed binary representation does not occur in the concatenation of the reversed binary representations of all preceding terms.

Original entry on oeis.org

0, 1, 3, 4, 5, 8, 10, 13, 15, 16, 18, 23, 24, 32, 35, 36, 38, 43, 55, 64, 66, 68, 70, 75, 76, 79, 83, 85, 88, 91, 95, 97, 116, 119, 120, 127, 128, 130, 132, 136, 140, 143, 147, 149, 150, 155, 157, 158, 163, 169, 170, 175, 176, 182, 186, 192, 196, 208
Offset: 0

Views

Author

Leroy Quet, Apr 18 2006

Keywords

Comments

"Reversed" means here "read from right to left", or "least significant bit first" (and not e.g. bitwise negation). One could also drop "reversed" everywhere and concatenate the preceding terms in decreasing order. The definition yields necessarily a strictly increasing sequence. - M. F. Hasler, Dec 29 2012

Examples

			The concatenation of the reversed binary representation of the first 5 terms (0, 1, 3, 4, 5) is concat(0,1,11,001,101)=0111001101. The reversed binary representation of the yet unused numbers 2,6,7,8,... are 01,011,111,0001,... It is seen that only the last of these four strings is not yet a substring in the above, therefore a(5)=8.
		

Crossrefs

See A118249 for the concatenation of the reversed binary representations.
Cf. A118248 (variant without reversal), A118252 (the same with positive terms).

Programs

  • Mathematica
    a = {{0}}; Do[k = 1; While[SequenceCount[Flatten@ a, Set[m, Reverse@ IntegerDigits[k, 2]]] > 0, k++]; AppendTo[a, m], {i, 57}]; Map[FromDigits[#, 2] &@ Reverse@ # &, a] (* Michael De Vlieger, Sep 19 2017 *)
  • PARI
    A118250(n,show=0,a=0)={my(c=[a],S=[],L); for(k=1,n, show && print1(a","); while( setsearch(S,binary(a++)),); c=concat(binary(a),c); S=[]; for(i=0,#c-L=#binary(a), c[i+1] & for(j=i+L,min(i+L+1,#c), S=setunion(S,Set(t=[vecextract(c,2^j-2^i)])))));a}  \\ M. F. Hasler, Dec 29 2012

Extensions

More terms from Graeme McRae, Apr 19 2006
Explicit definition from M. F. Hasler, Dec 29 2012

A118252 The least positive integer whose reversed binary representation does not occur in the concatenation of the reversed binary representations of all preceding terms.

Original entry on oeis.org

1, 2, 3, 4, 8, 10, 11, 12, 15, 16, 22, 24, 27, 32, 35, 36, 38, 43, 44, 54, 59, 64, 66, 70, 76, 79, 83, 85, 88, 91, 95, 97, 99, 116, 122, 127, 128, 130, 132, 136, 140, 147, 148, 150, 155, 158, 163, 169, 170, 175, 176, 179, 182, 184, 192, 196, 201, 217, 232
Offset: 1

Views

Author

Leroy Quet, Apr 18 2006

Keywords

Comments

See the variant A118250 for comments and examples.

Crossrefs

Cf. A118248 (variant without reversal), A118250 (the same with a(0)=0), A118251 (concatenation of terms in binary).
Cf. A190896.

Programs

  • Mathematica
    a = {1}; b = {1}; Do[k = b[[i - 1]] + 1; While[SequenceCount[Flatten@ a, Set[d, Reverse@ IntegerDigits[k, 2]]] != 0, k++]; a = Join[a, d]; AppendTo[b, k], {i, 2, 59}]; b (* Michael De Vlieger, Aug 21 2017 *)
  • PARI
    A118252(n,show=0,a=1)={my(c=[a],S=[],L); for(k=1,n, show & print1(a","); while( setsearch(S,binary(a++)),); c=concat(binary(a),c); S=[]; for(i=0,#c-L=#binary(a), c[i+1] & for(j=i+L,min(i+L+1,#c), S=setunion(S,Set(t=[vecextract(c,2^j-2^i)])))));a}  \\ M. F. Hasler, Dec 29 2012

Extensions

More terms from Graeme McRae, Apr 19 2006
Explicit definition from M. F. Hasler, Dec 29 2012

A355611 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that the binary string of |a(n) - a(n-1)| does not appear in the binary string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 1, 3, 5, 9, 17, 7, 23, 2, 12, 22, 6, 16, 37, 58, 10, 38, 4, 32, 60, 14, 48, 82, 8, 42, 85, 15, 61, 107, 11, 67, 131, 18, 86, 13, 77, 141, 21, 89, 25, 93, 20, 84, 148, 19, 83, 147, 27, 91, 155, 26, 90, 154, 24, 88, 152, 28, 92, 156, 36, 100, 164, 30, 94, 158, 29, 142, 78, 191, 31, 95, 159
Offset: 0

Views

Author

Scott R. Shannon, Sep 12 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers. In the first 200000 terms the only fixed points are 1199 and 14767. It is unknown if more exist.

Examples

			a(5) = 17 as the concatenation of a(0)..a(4) in binary is "01111011001" and |17 - a(4)| = |17 - 9| = 8 = 1000_2 which does not appear in the concatenated string. Since 1 = 1_2, 2 = 10_2, 3 = 11_2, 4 = 100_2, 5 = 101_2, 6 = 110_2, 7 = 111_2 all appear in the concatenated string, a(5) cannot be less than 17.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        alst, aset, astr, an, mink, mindiff = [], set(), "", 0, 1, 1
        for n in count(0):
            yield an; aset.add(an); astr += bin(an)[2:]
            prevan, an = an, mink
            while an + mindiff <= prevan and (an in aset or bin(abs(an-prevan))[2:] in astr): an += 1
            if an in aset or bin(abs(an-prevan))[2:] in astr:
                an = max(mink, prevan + mindiff)
                while an in aset or bin(an-prevan)[2:] in astr:
                    an += 1
            while mink in aset: mink += 1
            while bin(mindiff)[2:] in astr: mindiff += 1
    print(list(islice(agen(), 72))) # Michael S. Branicky, Oct 05 2022

A190896 Least positive integer whose binary representation does not occur in the concatenation of the binary representations of all earlier terms.

Original entry on oeis.org

1, 2, 3, 4, 8, 10, 13, 15, 16, 19, 20, 32, 35, 37, 38, 40, 49, 54, 61, 64, 67, 68, 73, 74, 79, 80, 85, 87, 93, 103, 117, 121, 127, 128, 131, 134, 136, 139, 141, 143, 148, 151, 152, 155, 156, 158, 160, 165, 166, 170, 172, 174, 182, 193, 197, 217, 218, 239, 241, 251, 256, 259, 262, 264, 267, 268
Offset: 0

Views

Author

M. F. Hasler, Dec 29 2012

Keywords

Comments

See the variant A118250 for comments and examples.

Crossrefs

Cf. A190897 (concatenation of binary representations), A118248 (the same with nonnegative integers), A118250, A118252 (variants where binary representations are reversed).

Programs

  • PARI
    A190896(n,show=0,a=1)={my(c=[0],S=[],L); for(k=1,n, show && print1(a","); while( setsearch(S,binary(a++)),); c=concat(c,binary(a)); S=[]; for(i=0,#c-L=#binary(a), c[i+1] & for(j=i+L,min(i+L+1,#c), S=setunion(S,Set(t=[vecextract(c,2^j-2^i)])))));a}

A362241 Binary encoding of the rows of A362240.

Original entry on oeis.org

0, 1, 0, 3, 0, 5, 7, 0, 10, 13, 0, 3, 4, 7, 14, 31, 4, 9, 13, 15, 17, 20, 27, 28, 37, 44, 51, 53, 63, 2, 15, 17, 20, 28, 31, 41, 44, 46, 48, 53, 58, 71, 78, 99, 101, 123, 2, 5, 7, 11, 17, 19, 24, 35, 39, 41, 55, 58, 63, 72, 83, 85, 89, 97, 107, 111, 113, 134
Offset: 1

Views

Author

Samuel Harkness, Apr 12 2023

Keywords

Examples

			The sequence begins:
   n    a(n)     A362240 row
  ---   ----     -----------
    1     0      0;
    2     1      1;
    3     0      0, 0;
    4     3      1, 1;
    5     0      0, 0, 0;
    6     5      1, 0, 1;
    7     7      1, 1, 1;
    8     0      0, 0, 0, 0;
    9    10      1, 0, 1, 0;
   10    13      1, 1, 0, 1;
   11     0      0, 0, 0, 0, 0;
   12     3      0, 0, 0, 1, 1;
   13     4      0, 0, 1, 0, 0;
		

Crossrefs

Programs

  • MATLAB
    See Links section.
    
  • Mathematica
    V = {0}; K = {0}; B = {0}; While[Length@B < 68, y = 0; While[y == 0, i = Length@V; V[[i]]++; While[V[[i]] == 2 && i > 1 , V[[i]] = 0; i--; V[[i]]++]; If[V[[1]] == 2, V = ConstantArray[0, Length@V + 1]]; z = 0; For[a = 1, a <= Length@K - Length@V + 1, a++, If[K[[a ;; a + Length@V - 1]] == V, z = 1; Break[]]]; If[z == 0, AppendTo[K, V]; b = 0; For[c = Length@V, c > 0, c--, b += V[[c]]*2^(Length@V - c)]; AppendTo[B, b]; K = Flatten[K]; y = 1]]]; Print[B]
  • Python
    from itertools import count, islice, product
    def bins(): yield from ("".join(b) for d in count(1) for b in product("01", repeat=d))
    def agen(s=""): yield from (int(t, 2) for t in bins() if t not in s and (s:=s+t))
    print(list(islice(agen(), 68))) # Michael S. Branicky, Apr 12 2023

Formula

a(n) = A053645(A362009(n) + 1).

A357377 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that |a(n) - a(n-1)| does not appear in the string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 25, 2, 6, 10, 14, 22, 4, 12, 20, 28, 44, 8, 24, 40, 56, 18, 34, 50, 23, 39, 55, 26, 42, 58, 29, 45, 61, 31, 47, 63, 27, 43, 59, 75, 37, 53, 69, 85, 36, 52, 68, 30, 46, 62, 78, 94, 110, 33, 49, 65, 81, 97, 113, 41, 57, 73, 35, 51, 67, 105, 143, 16, 54
Offset: 0

Views

Author

Scott R. Shannon, Sep 26 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers. In the first 200000 terms the only fixed points are 20, 24, 43 and 115. It is likely no more exist although this is unknown.
There are no other fixed points in the first 870000 terms. - Michael S. Branicky, Oct 05 2022

Examples

			a(12) = 25 as the concatenation of a(0)..a(11) is "013579111315171921" and |25 - a(11)| = |25 - 21| = 4 which does not appear in the concatenated string. Since a(11) contains a '2' and all other odd numbers appear in the string a(12) cannot be 23 or any even number less than 25.
a(13) = 2 as the concatenation of a(0)..a(12) is "01357911131517192125" and |2 - a(12)| = |2 - 25| = 23 which does not appear in the concatenated string.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        alst, aset, astr, an, mink, mindiff = [], set(), "", 0, 1, 1
        for n in count(0):
            yield an; aset.add(an); astr += str(an)
            prevan, an = an, mink
            while an + mindiff <= prevan and (an in aset or str(abs(an-prevan)) in astr): an += 1
            if an in aset or str(abs(an-prevan)) in astr:
                an = max(mink, prevan + mindiff)
                while an in aset or str(an-prevan) in astr:
                    an += 1
            while mink in aset: mink += 1
            while str(mindiff) in astr: mindiff += 1
    print(list(islice(agen(), 75))) # Michael S. Branicky, Oct 05 2022

A357449 a(0) = 0; for n > 0, a(n) is the smallest positive number not occurring earlier such that the binary string of a(n) plus the largest previous term does not appear in the binary string concatenation of a(0)..a(n-1).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 10, 6, 7, 9, 14, 15, 16, 17, 18, 20, 12, 24, 8, 28, 26, 30, 22, 33, 11, 21, 31, 32, 36, 37, 27, 35, 41, 13, 23, 40, 44, 38, 62, 46, 66, 19, 42, 63, 65, 69, 39, 59, 60, 68, 72, 56, 57, 71, 76, 52, 53, 80, 48, 49, 55, 58, 61, 64, 83, 45, 73, 77, 81, 82, 85, 43, 50, 75, 79, 87, 51
Offset: 0

Views

Author

Scott R. Shannon, Sep 29 2022

Keywords

Comments

The main concentration of terms lies near the line a(n) = n; there are 26 fixed points in the first 100000 terms. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(9) = 9 as the concatenation of a(0)..a(8) in binary is "0110111001011010110111" and 9 plus the largest previous term = 9 + 10 = 19 = 10011_2 which does not appear in the concatenated string. Since 10 + 8 = 18 = 10010_2 appears in the concatenated string, a(9) cannot be 8.
		

Crossrefs

Programs

  • Python
    from itertools import islice
    def agen():
        aset, astr, an, mink = {0}, "0", 0, 1
        while True:
            yield an; k, m = mink, max(aset)
            while k in aset or bin(m+k)[2:] in astr: k += 1
            while mink in aset: mink += 1
            an = k; aset.add(an); astr += bin(an)[2:]
    print(list(islice(agen(), 77))) # Michael S. Branicky, Sep 29 2022
Showing 1-10 of 16 results. Next