OFFSET
0,3
REFERENCES
N. J. A. Sloane and Allan Wilks, On sequences of Recaman type, paper in preparation, 2006.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
MATHEMATICA
b[0] = 0; b[1] = 1;
b[n_] := b[n] = For[m = 2, True, m++, If[FreeQ[Array[b, n-1], m], If[Abs[m - b[n-1]] > Abs[b[n-1] - b[n-2]], Return[m]]]];
a[0] = 0; a[n_] := a[n] = Abs[b[n] - b[n-1]];
Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 0, 50}] (* Jean-François Alcover, Aug 02 2018 *)
PROG
(Haskell)
a117073 n = a117073_list !! n
-- a117073_list defined in A078783. -- Reinhard Zumkeller, May 01 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 17 2006
STATUS
approved