login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Lexicographically earliest sequence of distinct positive integers such that for any n > 0, a(2*n+1) = a(2*n) XOR a(n) (where XOR denotes the bitwise XOR operator).
3

%I #14 Apr 29 2024 09:29:29

%S 1,2,3,4,6,8,11,9,13,10,12,7,15,5,14,16,25,17,28,18,24,19,31,26,29,20,

%T 27,32,37,33,47,34,50,35,58,36,53,39,59,38,52,40,48,42,57,41,54,43,49,

%U 46,51,44,56,64,91,23,55,65,100,30,63,66,109,67,97,68,118

%N Lexicographically earliest sequence of distinct positive integers such that for any n > 0, a(2*n+1) = a(2*n) XOR a(n) (where XOR denotes the bitwise XOR operator).

%C Conjecture: this sequence is a permutation of the positive integers.

%H Rémy Sigrist, <a href="/A372032/b372032.txt">Table of n, a(n) for n = 1..10001</a>

%H Rémy Sigrist, <a href="/A372032/a372032.gp.txt">PARI program</a>

%e The first terms, arranged alongside a binary tree where each right child equals its parent XOR its sibling, are:

%e |

%e .-------1-------.

%e | |

%e .---2---. .---3---.

%e | | | |

%e .-4-. .-6-. .-8-. .11-.

%e | | | | | | | |

%e 9 13 10 12 7 15 5 14

%o (PARI) \\ See Links section.

%Y See A372030 for similar sequences.

%Y Cf. A372128 (analog for bitwise OR operator).

%K nonn,base

%O 1,2

%A _Rémy Sigrist_, Apr 16 2024