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

A338823 Lexicographically earliest sequence of positive integers such that for any distinct m and n, a(m) OR a(m+1) <> a(n) OR a(n+1) (where OR denotes the bitwise OR operator).

Original entry on oeis.org

1, 1, 2, 2, 4, 1, 6, 8, 1, 10, 2, 13, 1, 16, 2, 17, 4, 4, 8, 8, 16, 4, 18, 5, 24, 1, 26, 2, 28, 3, 32, 1, 36, 2, 32, 4, 24, 32, 7, 40, 1, 42, 2, 44, 1, 48, 2, 49, 4, 40, 8, 49, 6, 48, 4, 56, 2, 57, 4, 58, 5, 64, 1, 66, 2, 68, 3, 72, 1, 76, 2, 72, 4, 64, 8, 71
Offset: 1

Views

Author

Rémy Sigrist, Nov 11 2020

Keywords

Examples

			The first terms, alongside a(n) OR a(n+1), are:
  n   a(n)  a(n) OR a(n+1)
  --  ----  --------------
   1     1               1
   2     1               3
   3     2               2
   4     2               6
   5     4               5
   6     1               7
   7     6              14
   8     8               9
   9     1              11
  10    10              10
  11     2              15
  12    13              13
		

Crossrefs

Programs

  • C
    See Links section.
  • Mathematica
    Block[{a = {1, 1}, b = {1}}, Do[Block[{k = 1, m}, While[! FreeQ[b, Set[m, BitOr @@ {a[[-1]], k}]], k++]; AppendTo[a, k]; AppendTo[b, m]], {i, 3, 76}]; a] (* Michael De Vlieger, Nov 12 2020 *)

A355413 Lexicographically earliest infinite sequence of positive numbers such that, for n>1, a(n) AND a(n-1) is distinct from all previous AND operations between adjacent terms, where AND is the binary AND operator.

Original entry on oeis.org

0, 1, 3, 3, 6, 5, 7, 7, 14, 9, 11, 11, 14, 13, 15, 15, 30, 17, 19, 19, 22, 21, 23, 23, 30, 25, 27, 27, 30, 29, 31, 31, 62, 33, 35, 35, 38, 37, 39, 39, 46, 41, 43, 43, 46, 45, 47, 47, 62, 49, 51, 51, 54, 53, 55, 55, 62, 57, 59, 59, 62, 61, 63, 63, 126, 65, 67, 67, 70, 69, 71, 71, 78, 73, 75, 75
Offset: 0

Views

Author

Scott R. Shannon, Jul 01 2022

Keywords

Comments

Each term must be chosen so that a subsequent term can always been found. This implies, for example, no power of 2 can ever be a term as the result of an AND operation between such a number and any following number will be either 0 or the power of 2, both of which have already appeared as the result of AND operations.
Every a(n) where n is odd is a fixed point.

Examples

			a(3) = 3 as a(2) = 3 and 3 AND 3 = 3, which has not occurred earlier for any AND's between adjacent terms. Note that a(3) cannot equal 2 = 10_2 as the result of any subsequent AND operation with 2 would be 0 or 2, both of which have already occurred.
		

Crossrefs

Showing 1-2 of 2 results.