OFFSET
1,3
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Colored scatterplot of the first 10000 terms (where the color is function of the parity of n)
Rémy Sigrist, C program for A338823
EXAMPLE
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
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 *)
PROG
(C) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Nov 11 2020
STATUS
approved