%I
%S 1,2,3,5,4,7,6,8,9,11,10,12,13,17,15,19,14,16,18,20,21,23,25,29,22,24,
%T 26,27,28,31,30,32,33,37,35,39,41,43,47,49,34,38,36,40,42,44,45,46,51,
%U 53,55,59,57,61,50,52,65,67,48,54,71,73,63,69,56,58,60,62,64,66,68,70
%N Smallest number not occurring earlier and coprime to a(ceiling(n/2)); a(1)=1.
%C a(2*n) > a(2*n1);
%C permutation of the natural numbers with inverse A098313:
%C A098312(n) = a(a(n)).
%H Reinhard Zumkeller, <a href="/A098311/b098311.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%o (Haskell)
%o import Data.List ((\\))
%o a098311 n = a098311_list !! (n1)
%o a098311_list = 1 : ys where
%o ys = 2 : f ys [3..] where
%o f (v:vs) ws = us ++ f vs (ws \\ us) where
%o us = take 2 $ filter ((== 1) . (gcd v)) ws
%o  _Reinhard Zumkeller_, Oct 11 2014
%K nonn
%O 1,2
%A _Reinhard Zumkeller_, Sep 02 2004
%E Typo in definition fixed by _Reinhard Zumkeller_, Oct 11 2014
