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.

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).

This page as a plain text file.
%I A338823 #12 Nov 14 2020 01:50:51
%S A338823 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,
%T A338823 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,
%U A338823 57,4,58,5,64,1,66,2,68,3,72,1,76,2,72,4,64,8,71
%N 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).
%H A338823 Rémy Sigrist, <a href="/A338823/b338823.txt">Table of n, a(n) for n = 1..10000</a>
%H A338823 Rémy Sigrist, <a href="/A338823/a338823.png">Colored scatterplot of the first 10000 terms</a> (where the color is function of the parity of n)
%H A338823 Rémy Sigrist, <a href="/A338823/a338823.txt">C program for A338823</a>
%e A338823 The first terms, alongside a(n) OR a(n+1), are:
%e A338823   n   a(n)  a(n) OR a(n+1)
%e A338823   --  ----  --------------
%e A338823    1     1               1
%e A338823    2     1               3
%e A338823    3     2               2
%e A338823    4     2               6
%e A338823    5     4               5
%e A338823    6     1               7
%e A338823    7     6              14
%e A338823    8     8               9
%e A338823    9     1              11
%e A338823   10    10              10
%e A338823   11     2              15
%e A338823   12    13              13
%t A338823 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 *)
%o A338823 (C) See Links section.
%Y A338823 Cf. A088177, A338824.
%K A338823 nonn,base
%O A338823 1,3
%A A338823 _Rémy Sigrist_, Nov 11 2020