cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A072007 a(0) = 0; for n>=1, a(n)=least nonnegative integer x such that |x-a(n-1)|>=n and x is not a(k) for any k

This page as a plain text file.
%I A072007 #6 Sep 04 2014 16:40:52
%S A072007 0,1,3,6,2,7,13,4,12,21,5,16,28,8,22,37,9,26,44,10,30,51,11,34,58,14,
%T A072007 40,67,15,45,75,17,49,82,18,53,89,19,57,96,20,61,103,23,68,113,24,71,
%U A072007 119,25,76,127,27,80,134,29,85,142,31,90,150,32
%N A072007 a(0) = 0; for n>=1, a(n)=least nonnegative integer x such that |x-a(n-1)|>=n and x is not a(k) for any k<n.
%C A072007 A permutation of the nonnegative integers.
%H A072007 Reinhard Zumkeller, <a href="/A072007/b072007.txt">Table of n, a(n) for n = 0..10000</a>
%H A072007 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%o A072007 (Haskell)
%o A072007 import Data.List (delete)
%o A072007 a072007 n = a072007_list !! n
%o A072007 a072007_list = 0 : f 1 0 [1..] where
%o A072007    f u v ws = g ws where
%o A072007      g (x:xs) = if abs (x - v) < u
%o A072007                    then g xs else x : f (u + 1) x (delete x ws)
%o A072007 -- _Reinhard Zumkeller_, Sep 04 2014
%Y A072007 Cf. A072008, A072009 (inverse).
%K A072007 nonn
%O A072007 0,3
%A A072007 _Clark Kimberling_, Jun 07 2002