%I #20 Jul 27 2015 22:12:03
%S 1,4,2,9,7,6,3,16,23,14,17,12,13,8,5,27,47,36,71,24,41,28,53,21,31,22,
%T 37,15,19,10,11,42,81,70,149,54,109,106,239,38,73,62,127,44,83,80,171,
%U 34,67,48,91,35,69,56,113,26,43,32,59,18,25,20,29,63,131,122,271,105,233,216,477,82,173,159,353,155,347,345,787,57
%N a(1) = 1, a(2n) = A205783(1+a(n)), a(2n+1) = A206074(a(n)), where A206074 and A205783 give binary codes for polynomials with coefficients 0 or 1 that are irreducible [resp. reducible] over Q.
%C This sequence can be represented as a binary tree. Each left hand child is produced as A205783(1+n), and each right hand child as A206074(n), when the parent contains n:
%C |
%C ...................1...................
%C 4 2
%C 9......../ \........7 6......../ \........3
%C / \ / \ / \ / \
%C / \ / \ / \ / \
%C / \ / \ / \ / \
%C 16 23 14 17 12 13 8 5
%C 27 47 36 71 24 41 28 53 21 31 22 37 15 19 10 11
%C etc.
%H Antti Karttunen, <a href="/A260422/b260422.txt">Table of n, a(n) for n = 1..8192</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F a(1) = 1, a(2n) = A205783(1+a(n)), a(2n+1) = A206074(a(n)).
%F As a composition of related permutations:
%F a(n) = A260423(A246378(n)).
%F a(n) = A260425(A246202(n)).
%o (PARI)
%o uplim = (2^21) + (2^20);
%o v206074 = vector(uplim);
%o v205783 = vector(uplim); v205783[1] = 1;
%o isA206074(n) = polisirreducible(Pol(binary(n)));
%o i=0; j=1; n=2; while((n < uplim), if(!(n%65536),print1(n,", ")); if(isA206074(n), i++; v206074[i] = n, j++; v205783[j] = n); n++); print(n);
%o A260422(n) = if(1==n, 1, if(0==(n%2), v205783[1+A260422(n/2)], v206074[A260422((n-1)/2)]));
%o for(n=1, 8192, write("b260422.txt", n, " ", A260422(n)));
%Y Inverse: A260421.
%Y Related permutations: A246202, A246378, A260423, A260425.
%Y Cf. A205783, A206074.
%Y Differs from A246378 for the first time at n=16, where a(16)=27, while A246378(16)=26.
%K nonn,tabf
%O 1,2
%A _Antti Karttunen_, Jul 25 2015