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

A190897 Concatenation of A190896 written in binary.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Dec 29 2012

Keywords

Comments

This sequence is mainly included because the sequences A118248, A118250, A118252 (variants of A190896) had "historically" been defined through the respective analogs A118247, A118249, A118251 of this present ("binary") sequence.

Crossrefs

Cf. A118247, A118249, A118251 (variants with nonnegative integers and/or binary representations reversed).

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

A365018 a(n) is the least positive integer not already in the sequence whose binary expansion is not the concatenation of any two earlier terms.

Original entry on oeis.org

1, 2, 3, 4, 8, 10, 13, 15, 16, 22, 23, 25, 30, 32, 36, 37, 38, 39, 41, 44, 46, 49, 50, 52, 53, 59, 60, 64, 69, 70, 71, 76, 78, 81, 82, 85, 88, 92, 97, 98, 104, 106, 109, 111, 115, 120, 125, 127, 128, 133, 134, 135, 136, 137, 140, 142, 145, 148, 149, 152, 156, 161, 162, 170, 176, 182
Offset: 1

Views

Author

Attila Kiss, Aug 16 2023

Keywords

Comments

a(n) first differs from A190896(n-1) at n=10: a(10)=22, whereas A190896(9)=19.

Examples

			5 is not a term since its binary expansion is "101", which is the concatenation of earlier a(2)="10" and a(1)="1".
19 is not a term since its binary expansion is "10011", which is the concatenation of a(4)="100" and a(3)="11".
		

Crossrefs

Programs

  • Mathematica
    conc[x_, y_] := FromDigits[Flatten@IntegerDigits[{x, y}, 2], 2]; a[1] = 1; a[n_] := a[n] = Module[{k = a[n - 1] + 1, v = Array[a, n - 1], c}, c = conc @@@ Select[Tuples[v, {2}], UnsameQ @@ # &]; While[! FreeQ[c, k], k++]; k]; Array[a, 60] (* Amiram Eldar, Sep 29 2023 *)
  • Python
    from itertools import islice
    def agen(): # generator of terms
        an, bins, concats = 1, {"1"}, set()
        while True:
            yield an
            while (bn:=bin(an:=an+1)[2:]) in concats: pass
            concats |= {bn+bi for bi in bins} | {bi+bn for bi in bins}
            bins.add(bn)
    print(list(islice(agen(),62))) # Michael S. Branicky, Sep 29 2023
Showing 1-3 of 3 results.