1,2

a(2*n) > a(2*n-1);

permutation of the natural numbers with inverse A098313:

A098312(n) = a(a(n)).

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

Index entries for sequences that are permutations of the natural numbers

(Haskell)

import Data.List ((\\))

a098311 n = a098311_list !! (n-1)

a098311_list = 1 : ys where

ys = 2 : f ys [3..] where

f (v:vs) ws = us ++ f vs (ws \\ us) where

us = take 2 $ filter ((== 1) . (gcd v)) ws

-- Reinhard Zumkeller, Oct 11 2014

Sequence in context: A160051 A082746 A098313 * A342265 A230086 A333404

Adjacent sequences: A098308 A098309 A098310 * A098312 A098313 A098314

nonn

Reinhard Zumkeller, Sep 02 2004

Typo in definition fixed by Reinhard Zumkeller, Oct 11 2014

approved