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

A354781 If the binary expansion of A354780(n) is 1 d_1 d_2 ... d_k, then the binary expansion of a(n) is c_1 c_2 ... c_k, where c_i = 1 - d_i.

Original entry on oeis.org

1, 3, 4, 12, 3, 19, 34, 64, 76, 136, 256, 768, 17, 1041, 50, 2080, 4096, 12288, 68, 16452, 200, 32896, 65536, 196608, 768, 262912, 524800, 1048576, 1049601, 2098176, 18, 4194322, 2096, 8390656, 16777216, 50331648, 12288, 67121152, 134225920, 268435456, 268451844, 536887296, 72, 1073741896, 32960, 2147516416, 4294967296, 12884901888
Offset: 1

Views

Author

N. J. A. Sloane, Jul 05 2022

Keywords

Examples

			See A354780.
		

Crossrefs

A354169 a(0) = 0, a(1) = 1, a(2) = 2; for k >= 2, given a(k), the sequence is extended by adjoining two terms: a(2*k-1) = smallest m >= 0 not among a(0) .. a(k) such that {m, a(k), a(k+1), ..., a(2*k-2)} are pairwise disjoint in binary, and a(2*k) = smallest m >= 0 not among a(0) .. a(k) such that {m, a(k), ..., a(2*k-1)} are pairwise disjoint in binary.

Original entry on oeis.org

0, 1, 2, 4, 8, 3, 16, 32, 64, 12, 128, 256, 512, 17, 1024, 34, 2048, 4096, 8192, 68, 16384, 136, 32768, 65536, 131072, 768, 262144, 524288, 1048576, 1025, 2097152, 18, 4194304, 2080, 8388608, 16777216, 33554432, 12288, 67108864, 134217728, 268435456, 16388
Offset: 0

Views

Author

N. J. A. Sloane, Jun 05 2022

Keywords

Comments

The paper by De Vlieger et al. (2022) calls this the "binary two-up sequence".
"Pairwise disjoint in binary" means no common 1-bits in their binary representations.
This is a set-theory analog of A090252. It bears the same relation to A090252 as A252867 does to A098550, A353708 to A121216, A353712 to A347113, etc.
A consequence of the definition, and also an equivalent definition, is that this is the lexicographically earliest infinite sequence of distinct nonnegative numbers with the property that the binary representation of a(n) is disjoint from (has no common 1's with) the binary representations of the following n terms.
An equivalent definition is that a(n) is the smallest nonnegative number that is disjoint (in its binary representation) from each of the previous floor(n/2) terms.
For the subsequence 0, 3, 12, 17, 34, ... of the terms that are not powers of 2 see A354680 and A354798.
All terms are the sum of at most two powers of 2 (see De Vlieger et al., 2022). - N. J. A. Sloane, Aug 29 2022

Examples

			After a(2) = 2 = 10_2, a(3) must equal ?0?_2, and the smallest such number we have not seen is a(3) = 100_2 = 4, and a(4) must equal ?00?_2, and the smallest such number we have not seen is a(4) = 1000_2 = 8.
		

Crossrefs

A355889 is a more efficient way to present this sequence.

Programs

Extensions

More terms from Rémy Sigrist, Jun 06 2022

A354757 a(n) = Sum_{k = ceiling(n/2)..n-1} A354169(k).

Original entry on oeis.org

0, 0, 1, 2, 6, 12, 15, 27, 59, 115, 127, 252, 508, 1004, 1021, 2013, 2047, 4031, 8127, 16307, 16375, 32631, 32767, 65279, 130815, 261375, 262143, 524270, 1048558, 2096110, 2097135, 4194253, 4194271, 8386527, 8388607, 16773119, 33550335, 67096575, 67108863
Offset: 0

Views

Author

Rémy Sigrist, Jun 06 2022

Keywords

Comments

The 1's in the binary expansion of a(n) are forbidden in that of A354169(n). In other words, a(n) AND A354169(n) = 0 (where AND denotes the bitwise AND operator).

Examples

			a(5) = A354169(3) + A354169(4) = 4 + 8 = 12.
a(7) = A354169(4) + A354169(5) + A354169(6) = 8 + 3 + 16 = 27.
		

Crossrefs

A354780 is a bisection.

Programs

  • PARI
    See Links section.
    
  • Python
    from itertools import count, islice
    from collections import deque
    from functools import reduce
    from operator import or_
    def A354757_gen(): # generator of terms
        aset, aqueue, b, f = {0,1,2}, deque([2]), 2, False
        yield from (0,0,1)
        while True:
            for k in count(1):
                m, j, j2, r, s = 0, 0, 1, b, k
                while r > 0:
                    r, q = divmod(r,2)
                    if not q:
                        s, y = divmod(s,2)
                        m += y*j2
                    j += 1
                    j2 *= 2
                if s > 0:
                    m += s*2**b.bit_length()
                if m not in aset:
                    yield sum(aqueue)
                    aset.add(m)
                    aqueue.append(m)
                    if f: aqueue.popleft()
                    b = reduce(or_,aqueue)
                    f = not f
                    break
    A354757_list = list(islice(A354757_gen(),40)) # Chai Wah Wu, Jun 06 2022

A354783 If the binary expansion of A354757(n) is 1 d_1 d_2 ... d_k, then the binary expansion of a(n) is c_1 c_2 ... c_k, where c_i = 1 - d_i.

Original entry on oeis.org

0, 0, 1, 1, 3, 0, 4, 4, 12, 0, 3, 3, 19, 2, 34, 0, 64, 64, 76, 8, 136, 0, 256, 256, 768, 0, 17, 17, 1041, 16, 50, 32, 2080, 0, 4096, 4096, 12288, 0, 68, 68, 16452, 64, 200, 128, 32896, 0, 65536, 65536, 196608, 0, 768, 768, 262912, 512, 524800, 0, 1048576, 1048576, 1049601, 1024, 2098176, 0, 18, 18, 4194322, 16, 2096, 2048, 8390656, 0, 16777216
Offset: 1

Views

Author

N. J. A. Sloane, Jul 08 2022

Keywords

Comments

Has the same relation to A354757 as A354781 does to A354780.
The offset is 1, to avoid having to define a(0).

Examples

			A354757(5) = 12 = 1100_2, so a(5) = 11_2 = 3.
A354757(6) = 15 = 1111_2, so a(6) = 0.
A354757(7) = 27 = 11011_2, so a(7) = 100_2 = 4.
		

Crossrefs

See A354793 for Hamming weight of a(n).

Extensions

Added comment and examples. - N. J. A. Sloane, Aug 02 2022
Showing 1-4 of 4 results.