%I #4 Mar 30 2012 17:31:15
%S 2,1,4,3,8,5,10,6,13,7,16,9,17,11,18,12,21,14,24,15,25,19,26,20,29,22,
%T 32,23,33,27,34,28,36,30,37,31,38,35,40,39,41,42,45,43,47,44,48,46,49,
%U 53,50,57,51,63,52,67,54,68,55,73,56,75,58,76,59,79,60,80,61,82,62,83
%N Inverse of A105361.
%C Position of n in permutation of natural numbers A105361.
%t p = RealDigits[Pi, 10, 100][[1]]; e = RealDigits[E, 10, 100][[1]]; r = Range[100]; a[n_] := a[n] = Block[{c = Complement[r, Table[ a[i], {i, n - 1}]]}, If[p[[n]] > e[[n]], Select[c, EvenQ[ # ] &][[1]], Select[c, OddQ[ # ] &][[1]]]]; t = Table[ a[n], {n, 80}]; Position[t, # ] & /@ Range[80] // Flatten
%Y Cf. A105361.
%K nonn
%O 1,1
%A _Zak Seidov_ and _Robert G. Wilson v_, May 10 2005