OFFSET
1,2
COMMENTS
This sequence can be represented as a binary tree. Each left hand child is produced as A269160(n), and each right hand child as A269164(1+n), when the parent node contains n:
|
...................1...................
7 2
25......../ \........9 14......../ \........3
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
111 33 63 11 50 18 13 4
401 143 231 41 193 79 53 15 222 66 126 22 51 17 28 5
etc.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..1023
Antti Karttunen, Entanglement Permutations, 2016-2017
MATHEMATICA
nmax = (* sequence length *) 100; terms (* from A269164 *) = 2000; Clear[a, f]; A269160[n_] := BitXor[n, BitOr[2 n, 4 n]]; f[max_] := f[max] = (s = Sort[Table[A269160[n], {n, 0, max}]]; Complement[Range[Last[s]], s][[1 ;; terms]]); f[terms]; f[max = 2 terms]; While[f[max] != f[max/2], max = 2 max]; A269164[n_Integer] := If[n > Length[f[max]], 0, f[max][[n]]]; a[1] = 1; a[n_] := a[n] = If[EvenQ[n], A269160[a[n/2]], A269164[1 + a[(n - 1)/2]]]; A269168 = Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Feb 23 2016 *)
PROG
CROSSREFS
KEYWORD
AUTHOR
Antti Karttunen, Feb 21 2016
STATUS
approved