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.

A345237 a(n) = Apex of XOR-triangle based on A346298(0..n).

Original entry on oeis.org

0, 1, 2, 7, 3, 5, 4, 14, 16, 23, 24, 10, 30, 6, 1, 36, 22, 30, 60, 37, 9, 13, 5, 53, 70, 92, 121, 39, 67, 105, 9, 108, 128, 160, 152, 132, 190, 210, 176, 105, 221, 157, 147, 208, 151, 16, 99, 116, 225, 139, 25, 20, 72, 67, 156, 52, 508, 467, 257, 440, 276, 439, 33, 11
Offset: 0

Views

Author

Thomas Scheuerle, Jul 14 2021

Keywords

Comments

This sequence is not a permutation of nonnegative integers, example a(1) = a(14) = 1.
Row 1 of the XOR-triangle is the smallest number such that there is no duplicated value in any row of this triangle.

Examples

			Example for a(8):
Row 9:                 16 ...  = a(8)
                       / \
Row 8:               14  30 ...
                     / \ / \
Row 7:              4  10  20 ...
                   / \ / \ / \
Row 6:            5   1  11  31 ...
                 / \ / \ / \ / \
Row 5:          3   6   7  12  19 ...
               / \ / \ / \ / \ / \
Row 4:        7   4   2   5   9  26 ...
             / \ / \ / \ / \ / \ / \
Row 3:      2   5   1   3   6  15  21 ...
           / \ / \ / \ / \ / \ / \ / \
Row 2:    1   3   6   7   4   2  13  24 ...
         / \ / \ / \ / \ / \ / \ / \ / \
Row 1:  0   1   2   4   3   7   5   8  16 ...
       ---------------------------------------
Row 1 is A346298(0), ..., A346298(8)
Row 2 is A346298(0) XOR A346298(1), ..., A346298(7) XOR A346298(8)
Row 9: a(8)
		

Crossrefs

Cf. A346298.

Formula

a(2^n) = A346298(2^n).
a(2^n + m) XOR a(m) = A346298(2^p + q) XOR A346298(q) if 2^n + m = 2^p + q.
a(n) <> a(n + 2^m + 2^p).

A360363 Lexicographically earliest sequence of distinct positive integers such that the bitwise XOR of two distinct terms are all distinct.

Original entry on oeis.org

1, 2, 3, 4, 8, 12, 16, 32, 48, 64, 85, 106, 128, 150, 171, 216, 237, 247, 256, 279, 297, 452, 512, 537, 558, 594, 640, 803, 860, 997, 1024, 1051, 1069, 1115, 1169, 1333, 1345, 1620, 1866, 2048, 2077, 2086, 2159, 2257, 2363, 2446, 2737, 2860, 3212, 3335, 3761
Offset: 1

Views

Author

Rémy Sigrist, Feb 04 2023

Keywords

Comments

This sequence is well defined as we can always extend it with a power of 2 not yet in the sequence.
This sequence contains all powers of 2 (A000079).
This sequence has similarities with A011185: here we combine terms with the bitwise XOR operator, there with the addition.
Every positive integer can be uniquely expressed as a(i) XOR a(j) with i < j (see A360364).

Examples

			The first terms are:
  n   a(n)  a(k) XOR a(n) (for k = 1..n-1)
  --  ----  ----------------------------------------------------------
   1     1  N/A
   2     2  3
   3     3  2, 1
   4     4  5, 6, 7
   5     8  9, 10, 11, 12
   6    12  13, 14, 15, 8, 4
   7    16  17, 18, 19, 20, 24, 28
   8    32  33, 34, 35, 36, 40, 44, 48
   9    48  49, 50, 51, 52, 56, 60, 32, 16
  10    64  65, 66, 67, 68, 72, 76, 80, 96, 112
  11    85  84, 87, 86, 81, 93, 89, 69, 117, 101, 21
  12   106  107, 104, 105, 110, 98, 102, 122, 74, 90, 42, 63
  13   128  129, 130, 131, 132, 136, 140, 144, 160, 176, 192, 213, 234
		

Crossrefs

Programs

  • Python
    from itertools import islice
    def agen(): # generator of terms
        aset, xset, k = set(), set(), 0
        while True:
            k += 1
            while any(k^an in xset for an in aset): k += 1
            yield k; xset.update(k^an for an in aset); aset.add(k)
    print(list(islice(agen(), 51))) # Michael S. Branicky, Feb 05 2023

A367262 Lexicographically earliest sequence of distinct nonnegative integers such that the values a(0) XOR ... XOR a(k) (for some k >= 0) are all distinct (where XOR denotes the bitwise XOR operator).

Original entry on oeis.org

0, 1, 2, 4, 3, 6, 7, 8, 5, 14, 9, 16, 10, 11, 12, 15, 13, 25, 17, 18, 19, 21, 22, 20, 24, 29, 23, 32, 26, 27, 28, 30, 31, 49, 33, 35, 34, 37, 38, 41, 40, 36, 44, 64, 39, 42, 43, 45, 46, 47, 48, 50, 51, 52, 54, 53, 56, 55, 59, 57, 60, 58, 66, 65, 69, 67, 61, 96
Offset: 0

Views

Author

Rémy Sigrist, Nov 11 2023

Keywords

Comments

This sequence is a variant of A333400; here we combine initial terms with the XOR operator, there with the addition.
This sequence is well defined; after some initial terms we can extend the sequence with a power of 2 greater that any prior term or even a smaller value.
This sequence is a permutation of the nonnegative integers (with inverse A367263):
- for any k >= 0, the least value >= 2^k is precisely 2^k,
- all powers of 2 appear in the sequence,
- after a power of 2, if the least value not yet in the sequence is less than this power of 2, then this value will be the next term.

Examples

			The first terms are:
  n   a(n)  a(0) XOR ... XOR a(n)
  --  ----  ---------------------
   0     0                      0
   1     1                      1
   2     2                      3
   3     4                      7
   4     3                      4
   5     6                      2
   6     7                      5
   7     8                     13
   8     5                      8
   9    14                      6
  10     9                     15
  11    16                     31
  12    10                     21
		

Crossrefs

Cf. A333400, A346298, A367263 (inverse), A367264.

A380112 Lexicographically earliest infinite sequence of positive integers whose XOR difference triangle contains only distinct values.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 9, 18, 64, 128, 39, 75, 156, 256, 76, 137, 269, 407, 512, 180, 78, 606, 432, 1024, 63, 771, 1037, 604, 789, 1144, 2048, 31, 564, 1661, 772, 2176, 1286, 2044, 3105, 1638, 377, 2606, 4096, 662, 1857, 4124, 536, 1463, 4188, 2242, 6453, 5302
Offset: 1

Views

Author

Rémy Sigrist, Jan 12 2025

Keywords

Comments

By necessity, all terms are distinct.
This sequence is an infinite variant of A378141.

Crossrefs

Cf. A099884, A346298, A338047, A378141, A380148 (XOR difference triangle).

Programs

  • PARI
    \\ See Links section.
Showing 1-4 of 4 results.