OFFSET
0,3
COMMENTS
A permutation of the nonnegative integers.
LINKS
PROG
(Haskell)
import Data.List (delete)
a072007 n = a072007_list !! n
a072007_list = 0 : f 1 0 [1..] where
f u v ws = g ws where
g (x:xs) = if abs (x - v) < u
then g xs else x : f (u + 1) x (delete x ws)
-- Reinhard Zumkeller, Sep 04 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jun 07 2002
STATUS
approved