0,3

A permutation of the nonnegative integers.

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

Index entries for sequences that are permutations of the natural numbers

(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

Cf. A072008, A072009 (inverse).

Sequence in context: A169749 A169750 A249558 * A078783 A273465 A328503

Adjacent sequences: A072004 A072005 A072006 * A072008 A072009 A072010

nonn

Clark Kimberling, Jun 07 2002

approved