OFFSET
1,1
COMMENTS
a(a(n))=n: a self-inverse permutation of natural numbers.
LINKS
PROG
(Haskell)
import Data.List (delete)
a094510 n = a094510_list !! (n-1)
a094510_list = f 1 [1..] where
f x zs = g zs where
g (y:ys) = if y /= x && a000120 y == wt
then y : f (x + 1) (delete y zs) else g ys
wt = a000120 x
-- Reinhard Zumkeller, Nov 23 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 06 2004
STATUS
approved