login
A352200
a(0)=0, a(1)=1; thereafter, a(n) is the smallest number m not yet in the sequence such that the binary expansions of m and a(n-1) have a 1 in the same position, but the positions of the 1's in the binary expansions of m and a(n-2) are disjoint, except that the second condition is ignored if it would imply that no choice for m were possible.
1
0, 1, 3, 2, 6, 4, 5, 9, 8, 10, 7, 17, 16, 18, 11, 12, 20, 19, 33, 32, 34, 14, 13, 49, 48, 21, 15, 40, 96, 64, 65, 23, 22, 24, 41, 35, 66, 68, 28, 25, 67, 38, 36, 29, 26, 98, 37, 129, 128, 130, 27, 44, 100, 80, 144, 131, 39, 52, 88, 72, 30, 50, 97, 69, 132, 136, 42, 51, 81, 76, 46, 146, 145, 45, 70, 82, 56, 137, 71, 54, 152, 73, 99, 134, 140, 57
OFFSET
0,3
COMMENTS
The second condition is ignored precisely when the positions of the 1's in a(n-1) are a subset of the 1's in a(n-2).
This is a set-theory analog of A352187.
LINKS
N. J. A. Sloane, Maple program
EXAMPLE
a(0)=0 and a(1)=1=1_2 are given.
a(2) = 3 = 11_2 is disjoint from a(0) and intersects a(1).
a(3) = 2 = 10_2 is disjoint from a(1) and intersects a(2).
Now there is no choice for a(4) that meets both conditions, so we ignore the no-intersection-with-a(n-2) condition, and take a(4) = 6 = 110_2.
MAPLE
See link.
CROSSREFS
This completes a set of four pairs of sequences: (A064413 and A115510), (A098550 and A252867), (A336957 and A338833), (A352187 and this sequence, A352200).
Sequence in context: A084494 A084498 A226077 * A066182 A195114 A059399
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Mar 26 2022
STATUS
approved